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

From Jan Wieck
Subject Re: Fundamental error in "no WAL log" index/file creation
Date
Msg-id 42BEA648.7010307@Yahoo.com
Whole thread Raw
In response to Re: Fundamental error in "no WAL log" index/file creation stuff  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fundamental error in "no WAL log" index/file creation stuff
Re: Fundamental error in "no WAL log" index/file creation
List pgsql-hackers
On 6/25/2005 6:58 PM, Tom Lane wrote:
> I wrote:
>> It seems our choices are (a) somehow fix things so CREATE DATABASE
>> replay doesn't have to zap the whole directory, (b) force a checkpoint
>> immediately after any CREATE DATABASE, so that we never have to replay
>> one except in a PITR situation, or (c) abandon non-WAL-logged index
>> and table builds.
> 
> Having overcome my initial dismay at missing such a fundamental problem,
> I've thought harder about it and concluded that (b) is clearly the thing
> to do.
> 
> I think it would take a wholesale redesign of the CREATE DATABASE
> mechanism to do (a).  While there are a number of ugly things about
> CREATE DATABASE that could perhaps be fixed with a redesign,
> I don't currently have any good idea about how to do it right.
> In any case this path wouldn't be an acceptable backpatch for the 8.0
> branch.

One way of redesigning CREATE DATABASE would be to build the new 
database directory from scratch using bki files. Doing so would lose the 
current template mechanism, but that can easily be redesigned into a 
utility that creates a bki file set from any existing database. The 
other annoyance this redesign would fix is the createdb failures because 
the template DB is in use.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-hackers by date:

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