Use a latch to make startup process wake up and replay immediately when
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 15 Sep 2010 10:35:05 +0000 (10:35 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 15 Sep 2010 10:35:05 +0000 (10:35 +0000)
commit723d0184e2972f21db0f85feef3d35f0cb9b3298
tree0fc71e9bb51fc6f347f7ec630c71e3362d8e496d
parent236b6bc29e532822a366b56404ecaf1d906229bf
Use a latch to make startup process wake up and replay immediately when
new WAL arrives via streaming replication. This reduces the latency, and
also allows us to use a longer polling interval, which is good for energy
efficiency.

We still need to poll to check for the appearance of a trigger file, but
the interval is now 5 seconds (instead of 100ms), like when waiting for
a new WAL segment to appear in WAL archive.
src/backend/access/transam/xlog.c
src/backend/replication/walreceiver.c
src/include/access/xlog.h