On Fri, 2011-03-04 at 00:02 +0900, Fujii Masao wrote: > + else if (WaitingForSyncRep) > + { > + /* > + * This must NOT be a FATAL message. We want > the state of the > + * transaction being aborted to be > indeterminate to ensure that > + * the transaction completion guarantee is > never broken. > + */ > > The backend can reach this code path after returning the commit to the > client. > Instead, how about doing this in EndCommand, to close the connection > before > returning the commit?
I don't really understand this comment. You can't get there after returning the COMMIT message. Once we have finished waiting we set WaitingForSyncRep = false, before we return to RecordTransactionCommit() and continue from there. Anyway, this is code in the interrupt handler and only gets executed when we receive SIGTERM for a fast shutdown. -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers