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

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fundamental error in "no WAL log" index/file creation
Date: 2005-06-26 12:57:44
Message-ID: 42BEA648.7010307@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-06-26 12:59:37 Re: Open items
Previous Message Michael Paesold 2005-06-26 09:39:38 Re: Fundamental error in "no WAL log" index/file creation stuff