|
From: 鈴木 幸市 <ko...@in...> - 2014-04-10 10:58:36
|
Thank you Pavan for the quick work.
I’m still wondering if we should rewind transaction to read/write as in the case of 9.2. In the case of PG, pg_dump simply reads from the catalog. In our case, it is in GTM so we must use nextval, which needs transaction read/write.
To do this, we need one more function for sequence to get current value as read-only operation, which may take a bit longer.
Any more inputs?
---
Koichi Suzuki
2014/04/10 16:11、Pavan Deolasee <pav...@gm...<mailto:pav...@gm...>> のメール:
On Thu, Apr 10, 2014 at 12:29 PM, Juned Khan <jkh...@gm...<mailto:jkh...@gm...>> wrote:
Hi Masataka,
Yeah you are correct, even pg_dumpall is not working.
This code in pg_dump.c seems to be source of the bug. Sorry, I don't have time right now to study it further and suggest a fix. As a temporary work around so that you can make progress, you can try compiling with the attached patch. This bug must be fixed in a saner way in the XC core though.
/*
* In Postgres-XC it is possible that the current value of a
* sequence cached on each node is different as several sessions
* might use the sequence on different nodes. So what we do here
* to get a consistent dump is to get the next value of sequence.
* This insures that sequence value is unique as nextval is directly
* obtained from GTM.
*/
resetPQExpBuffer(query);
appendPQExpBuffer(query, "SELECT pg_catalog.nextval(");
Thanks,
Pavan
--
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee
<no-read-only-pg-dump.patch>------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_______________________________________________
Postgres-xc-general mailing list
Pos...@li...
https://lists.sourceforge.net/lists/listinfo/postgres-xc-general
|