Skip site navigation (1) Skip section navigation (2)

pgsql: Fix archive_cleanup_command.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix archive_cleanup_command.
Date: 2012-11-19 08:20:43
Message-ID: E1TaMax-0005Hv-7Z@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix archive_cleanup_command.

When I moved ExecuteRecoveryCommand() from xlog.c to xlogarchive.c, I didn't
realize that it's called from the checkpoint process, not the startup
process. I tried to use InRedo variable to decide whether or not to attempt
cleaning up the archive (must not do so before we have read the initial
checkpoint record), but that variable is only valid within the startup
process.

Instead, let ExecuteRecoveryCommand() always clean up the archive, and add
an explicit argument to RestoreArchivedFile() to say whether that's allowed
or not. The caller knows better.

Reported by Erik Rijkers, diagnosis by Fujii Masao. Only 9.3devel is
affected.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/644a0a6379afc00803dd89ffe8416514f5dfc217

Modified Files
--------------
src/backend/access/transam/timeline.c    |    6 ++--
src/backend/access/transam/xlog.c        |   32 +++++++----------------------
src/backend/access/transam/xlogarchive.c |   18 +++++++++++-----
src/include/access/xlog_internal.h       |    3 +-
4 files changed, 25 insertions(+), 34 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-11-19 17:24:40
Subject: pgsql: Improve handling of INT_MIN / -1 and related cases.
Previous:From: Tom LaneDate: 2012-11-18 22:16:04
Subject: pgsql: Limit values of archive_timeout, post_auth_delay,auth_delay.mil

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group