From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | commit dfda6ebaec67 versus wal_keep_segments |
Date: | 2013-04-03 05:08:20 |
Message-ID: | CAMkU=1wGY3KyXXLij2QZeUvU_hG6UqanUD=c84UCebSewVcLag@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This commit introduced a problem with wal_keep_segments:
commit dfda6ebaec6763090fb78b458a979b558c50b39b
Author: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Date: Sun Jun 24 18:06:38 2012 +0300
Don't waste the last segment of each 4GB logical log file.
in a side window do: watch "ls -lrt /tmp/data/pg_xlog"
dfda6ebaec/bin/initdb -D /tmp/data
dfda6ebaec/bin/pg_ctl -D /tmp/data -l logfile restart -o "--fsync=off
--wal_keep_segments=20"
createdb
pgbench -i -s10
pgbench -T3600
xlogs accumulate until there are about 26 of them. Then all of a sudden
they drop down to 11 of them. Then it builds back up to around 26, and
seems to stay there permanently.
At some point when it is over-pruning and recycling, it recyles the log
files that are still needed for recovery, and if the database crashes at
that point it will not recover because it can't find either the primary
secondary checkpoint records.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2013-04-03 06:24:56 | Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |
Previous Message | Bruce Momjian | 2013-04-03 00:48:53 | psql crash fix |