Thread: pgsql: Change the logic to decide when to delete old WAL segments, so

pgsql: Change the logic to decide when to delete old WAL segments, so

From
heikki@postgresql.org (Heikki Linnakangas)
Date:
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        config.sgml (r1.262 -> r1.263)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.262&r2=1.263)
        high-availability.sgml (r1.58 -> r1.59)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/high-availability.sgml?r1=1.58&r2=1.59)
    pgsql/src/backend/access/transam:
        xlog.c (r1.391 -> r1.392)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.391&r2=1.392)
    pgsql/src/backend/replication:
        walsender.c (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walsender.c?r1=1.14&r2=1.15)
    pgsql/src/backend/utils/misc:
        guc.c (r1.546 -> r1.547)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.546&r2=1.547)
        postgresql.conf.sample (r1.281 -> r1.282)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample?r1=1.281&r2=1.282)
    pgsql/src/include/access:
        xlog.h (r1.105 -> r1.106)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.105&r2=1.106)