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