On Fri, May 6, 2011 at 4:22 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> The attached fix-clogredo diff is my proposal for a fix for this. > > That seems pretty grotty :-( > > I think a more elegant fix might be to just swap the order of the > ExtendCLOG and ExtendSUBTRANS calls in GetNewTransactionId. The > reason that would help is that pg_subtrans isn't WAL-logged, so if > we succeed doing ExtendSUBTRANS and then fail in ExtendCLOG, we > won't have written any XLOG entry, and thus repeated failures will not > result in repeated XLOG entries. I seem to recall having considered > exactly that point when the clog WAL support was first done, but the > scenario evidently wasn't considered when subtransactions were stuck > in :-(.
I agree with Tom about the need for a fix that prevents generation of repeated WAL records. OTOH, I also like Joe's fix in the recovery code to avoid responding to repeated records. Can we have both please? -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers