Re: Fundamental error in "no WAL log" index/file creation stuff

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fundamental error in "no WAL log" index/file creation stuff
Date: 2005-06-26 13:19:52
Message-ID: 7682.1119791992@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> (b) force a checkpoint
>> immediately after any CREATE DATABASE, so that we never have to replay
>> one except in a PITR situation

> So wouldn't this mean that any CREATE DATABASE won't work properly in PITR?

It works fine in a rollforward situation. However see the note I added
to backup.sgml:

If a CREATE DATABASE command is executed while a base backup is
being taken, and then the template database that the CREATE
DATABASE copied is modified while the base backup is still in
progress, it is possible that recovery will cause those
modifications to be propagated into the created database as
well. This is of course undesirable. To avoid this risk, it is best
not to modify any template databases while taking a base backup.

I don't see anything much we can do about this except add the warning;
we cannot say which state of the template database will be picked up
by the filesystem backup.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-26 13:29:20 Re: Open items
Previous Message Andrew Dunstan 2005-06-26 13:16:16 Re: Fundamental error in "no WAL log" index/file creation