Disable synchronous commits in pg_rewind.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 6 Oct 2016 10:24:46 +0000 (13:24 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 6 Oct 2016 10:24:46 +0000 (13:24 +0300)
commitd7eb76b908a3aac68c23c7d3553c65c80e92b823
tree53bb972e159470547eda2e80bf3313d3e1c56dd7
parentb56fb691b0033f9b86e0552bd5adfd485f05eef6
Disable synchronous commits in pg_rewind.

If you point pg_rewind to a server that is using synchronous replication,
with "pg_rewind --source-server=...", and the replication is not working
for some reason, pg_rewind will get stuck because it creates a temporary
table, which needs to be replicated. You could call broken replication a
pilot error, but pg_rewind is often used in special circumstances, when
there are changes to the replication setup.

We don't do any "real" updates, and we don't care about fsyncing or
replicating the operations on the temporary tables, so fix that by
setting synchronous_commit off.

Michael Banck, Michael Paquier. Backpatch to 9.5, where pg_rewind was
introduced.

Discussion: <20161005143938.GA12247@nighthawk.caipicrew.dd-dns.de>
src/bin/pg_rewind/libpq_fetch.c