pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Mark Kirkwood <markir@coretech.co.nz>
Cc: pgsql-hackers@postgresql.org
Subject: Re: PITR COPY Failure (was Point in Time Recovery)
Date: Tue, 20 Jul 2004 08:51:54 -0400
Message-ID: <7787.1090327914@sss.pgh.pa.us> (raw)
In-Reply-To: <1090324635.28049.2554.camel@stromboli>
References: <200407141555.i6EFtnk22984@mail.osdl.org>
	<1089833620.17493.4624.camel@stromboli>
	<40F5E14A.4090003@coretech.co.nz>
	<1089875702.17493.5539.camel@stromboli>
	<40F652C6.4070007@coretech.co.nz>
	<1089935215.17493.6906.camel@stromboli>
	<40FA0F93.8010607@coretech.co.nz>
	<40FC6BF2.5050701@coretech.co.nz>
	<3607.1090296869@sss.pgh.pa.us>
	<1090324635.28049.2554.camel@stromboli>

Simon Riggs <simon@2ndquadrant.com> writes:
>> The quick and dirty solution would be to dike out the safety check at
>> 4268ff.  

> If you take out that check, we still fail because the wasted space at
> the end is causing a "record with zero length" error.

Ugh.  I'm beginning to think we ought to revert the patch that added the
don't-split-across-files logic to XLogInsert; that seems to have broken
more assumptions than I realized.  That was added here:

2004-02-11 17:55  tgl

	* src/: backend/access/transam/xact.c,
	backend/access/transam/xlog.c, backend/access/transam/xlogutils.c,
	backend/storage/smgr/md.c, backend/storage/smgr/smgr.c,
	bin/pg_controldata/pg_controldata.c,
	bin/pg_resetxlog/pg_resetxlog.c, include/access/xact.h,
	include/access/xlog.h, include/access/xlogutils.h,
	include/pg_config_manual.h, include/catalog/pg_control.h,
	include/storage/smgr.h: Commit the reasonably uncontroversial parts
	of J.R. Nield's PITR patch, to wit: Add a header record to each WAL
	segment file so that it can be reliably identified.  Avoid
	splitting WAL records across segment files (this is not strictly
	necessary, but makes it simpler to incorporate the header records).
	 Make WAL entries for file creation, deletion, and truncation (as
	foreseen but never implemented by Vadim).  Also, add support for
	making XLOG_SEG_SIZE configurable at compile time, similarly to
	BLCKSZ.  Fix a couple bugs I introduced in WAL replay during recent
	smgr API changes.  initdb is forced due to changes in pg_control
	contents.

There are other ways to do this, for example we could treat the WAL page
headers as variable-size, and stick the file labeling info into the
first page's header instead of making it be a separate record.  The
separate-record way makes it easier to incorporate future additions to
the file labeling info, but I don't really think it's critical to allow
for that.

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <7787.1090327914@sss.pgh.pa.us>
Permalink:  ../7787.1090327914@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7787.1090327914@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, markir@coretech.co.nz, pgsql-hackers@postgresql.org
  Subject: Re: PITR COPY Failure (was Point in Time Recovery)
  In-Reply-To: <7787.1090327914@sss.pgh.pa.us>
  References: <200407141555.i6EFtnk22984@mail.osdl.org> <1089833620.17493.4624.camel@stromboli> <40F5E14A.4090003@coretech.co.nz> <1089875702.17493.5539.camel@stromboli> <40F652C6.4070007@coretech.co.nz> <1089935215.17493.6906.camel@stromboli> <40FA0F93.8010607@coretech.co.nz> <40FC6BF2.5050701@coretech.co.nz> <3607.1090296869@sss.pgh.pa.us> <1090324635.28049.2554.camel@stromboli> <7787.1090327914@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox