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

Forcing current WAL file to be archived

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Hannu Krosing <hannu(at)skype(dot)net>
Subject: Forcing current WAL file to be archived
Date: 2006-07-31 22:26:30
Message-ID: 1154384790.3226.21.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Patch included to implement xlog switching, using an xlog record
"processing instruction" and forcibly moving xlog pointers.

1. Happens automatically on pg_stop_backup()

2. Can happen manually via pg_switch_xlog()

3. Implement range of utility functions:
	pg_current_wal_offset()
	pg_current_xlogfile()
	pg_current_xlogfile_offset() - for Hannu
	pg_xlogfile_from_wal_offset() for interpreting output from
pg_switch_xlog, pg_start/stop_backup()

Passes make check, applies cleanly to HEAD, includes doc patches with
clean SGML builds.

Design as clean as possible given and has implementation of
archive_timeout in mind also. Happy to work further on any code cleanups
requested.

I've done a variety of testing on it, doing concurrent pg_regress and
pg_switch_xlog(). All known issues resolved. Main test cases and sample
outputs are in switchtest.sh

Wide variety of cases need testing, so I'm expecting some further issues
to be reported.

I'm now working on completing the restartable recovery patch, which will
include further tests of PITR recoveries on the xswitch.patch.

-- 
  Simon Riggs
  EnterpriseDB          http://www.enterprisedb.com

Attachment: xswitch.patch
Description: text/x-patch (37.4 KB)
Attachment: switchtest.sh
Description: application/x-shellscript (4.3 KB)

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2006-07-31 22:45:35
Subject: Re: Forcing current WAL file to be archived
Previous:From: Chris BrowneDate: 2006-07-31 22:25:30
Subject: OSCON fallout - Compressed Annealing optimizer

pgsql-patches by date

Next:From: Simon RiggsDate: 2006-07-31 22:47:38
Subject: WIP archive_timeout patch
Previous:From: Joshua D. DrakeDate: 2006-07-31 21:46:45
Subject: Re: [HACKERS] 8.2 features?

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