Re: Fundamental error in "no WAL log" index/file creation stuff - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fundamental error in "no WAL log" index/file creation stuff
Date
Msg-id 7682.1119791992@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fundamental error in "no WAL log" index/file creation stuff  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.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
theCREATE    DATABASE copied is modified while the base backup is still in    progress, it is possible that recovery
willcause those    modifications to be propagated into the created database as    well. This is of course undesirable.
Toavoid 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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Fundamental error in "no WAL log" index/file creation
Next
From: Tom Lane
Date:
Subject: Re: Open items