pgsql: In standby mode, respect checkpoint_segments in addition to - Mailing list pgsql-committers

From heikki@postgresql.org (Heikki Linnakangas)
Subject pgsql: In standby mode, respect checkpoint_segments in addition to
Date
Msg-id 20100609150407.0F9867541D4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
In standby mode, respect checkpoint_segments in addition to
checkpoint_timeout to trigger restartpoints. We used to deliberately only
do time-based restartpoints, because if checkpoint_segments is small we
would spend time doing restartpoints more often than really necessary.
But now that restartpoints are done in bgwriter, they're not as
disruptive as they used to be. Secondly, because streaming replication
stores the streamed WAL files in pg_xlog, we want to clean it up more
often to avoid running out of disk space when checkpoint_timeout is large
and checkpoint_segments small.

Patch by Fujii Masao, with some minor changes by me.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xlog.c (r1.418 -> r1.419)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.418&r2=1.419)
    pgsql/src/backend/replication:
        walreceiver.c (r1.13 -> r1.14)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiver.c?r1=1.13&r2=1.14)

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Fix connection leak in dblink when dblink_connect() or
Next
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Add index entry for ::, per complaint from John Gage.