diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2016-09-05 09:44:38 +0100 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2016-09-05 09:44:38 +0100 |
commit | d851bef2d60ff9345249ff67c053e37fe4b364cc (patch) | |
tree | dbed79cd566941b179fe9e6b9d930a0502b6af99 /src/include/regex/regex.h | |
parent | b6182081be4a795d70b966be2542ad32d1ffbc20 (diff) | |
download | postgresql-d851bef2d60ff9345249ff67c053e37fe4b364cc.tar.gz postgresql-d851bef2d60ff9345249ff67c053e37fe4b364cc.zip |
Dirty replication slots when using sql interface
When pg_logical_slot_get_changes(...) sets confirmed_flush_lsn to the point at
which replay stopped, it doesn't dirty the replication slot. So if the replay
didn't cause restart_lsn or catalog_xmin to change as well, this change will
not get written out to disk. Even on a clean shutdown.
If Pg crashes or restarts, a subsequent pg_logical_slot_get_changes(...) call
will see the same changes already replayed since it uses the slot's
confirmed_flush_lsn as the start point for fetching changes. The caller can't
specify a start LSN when using the SQL interface.
Mark the slot as dirty after reading changes using the SQL interface so that
users won't see repeated changes after a clean shutdown. Repeated changes still
occur when using the walsender interface or after an unclean shutdown.
Craig Ringer
Diffstat (limited to 'src/include/regex/regex.h')
0 files changed, 0 insertions, 0 deletions