Re: Sync Rep v19 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Sync Rep v19
Date
Msg-id 1299179873.10703.545.camel@ebony
Whole thread Raw
In response to Re: Sync Rep v19  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Sync Rep v19
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Quick Extensions Question
Next
From: Heikki Linnakangas
Date:
Subject: Re: Time zone database