Re: Standalone synchronous master

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Pflug <fgp@phlo.org>
Cc: "Joshua D. Drake" <jd@commandprompt.com>, Stephen Frost <sfrost@snowman.net>, Adrian Klaver <adrian.klaver@gmail.com>, Josh Berkus <josh@agliodbs.com>, Andres Freund <andres@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, Amit Kapila <amit.kapila16@gmail.com>, Hannu Krosing <hannu@2ndquadrant.com>, MauMau <maumau307@gmail.com>, Kevin Grittner <kgrittn@ymail.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Simon Riggs <simon@2ndquadrant.com>, Rajeev rastogi <rajeev.rastogi@huawei.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2014-01-11T17:51:32Z
Lists: pgsql-hackers
Florian Pflug <fgp@phlo.org> writes:
> Hm, I was about to suggest that you can set statement_timeout before
> doing COMMIT to limit the amount of time you want to wait for the
> standby to respond. Interestingly, however, that doesn't seem to work,
> which is weird, since AFAICS statement_timeout simply generates a
> query cancel requester after the timeout has elapsed, and cancelling
> the COMMIT with Ctrl-C in psql *does* work.

> I'm quite probably missing something, but what?

finish_xact_command() disables statement timeout before committing.

Not sure about the pros and cons of doing that later in the sequence.

			regards, tom lane