Change the logic to decide when to delete old WAL segments, so that it
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 12 Apr 2010 09:52:29 +0000 (09:52 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 12 Apr 2010 09:52:29 +0000 (09:52 +0000)
commite57cd7f0a1622138d5489477e0625741e036e940
tree78e648e83c221f635bdf01cb424c3964a3680fbe
parent93f35f0955f4a9c7bda191f80e3b64ba509ce923
Change the logic to decide when to delete old WAL segments, so that it
doesn't take into account how far the WAL senders are. This way a hung
WAL sender doesn't prevent old WAL segments from being recycled/removed
in the primary, ultimately causing the disk to fill up. Instead add
standby_keep_segments setting to control how many old WAL segments are
kept in the primary. This also makes it more reliable to use streaming
replication without WAL archiving, assuming that you set
standby_keep_segments high enough.
doc/src/sgml/config.sgml
doc/src/sgml/high-availability.sgml
src/backend/access/transam/xlog.c
src/backend/replication/walsender.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/access/xlog.h