Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> The reason for this confusion is that synchronous_commit has both a
> local and a remote meaning, and in this case the local meaning on the
> subscriber has an impact on the remote meaning of the publisher.
And another, if I get it right, is that while asynchronous commit makes
server report 'success' faster, it also makes the actual WAL writing to
the disk *slower* in terms of latency, because this action is delayed
for some arbitrary time (well, to be exactly, up to 3*wal_writer_delay
milliseconds). As for synchronous commit, its WAL is written as soon as
possible, though I am not sure which guarantees exist here -- walwriter
is woken up each wal_writer_delay ms, but it seems to write only fully
completed pages under heavy load. Please correct me if I am wrong.
In general, it's clear now, thanks.
--
Arseny Sher