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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fundamental error in "no WAL log" index/file creation stuff
Date: 2005-06-26 13:14:50
Message-ID: 7614.1119791690@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> 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.

Not so easily as all that. The .bki mechanism is pretty darn restricted
as to what it can generate, because of the limitations of bootstrap
mode. (And when you are starting up without pg_proc or pg_type, it's
not trivial to remove those restrictions either.)

I thought for a bit about
1. Clone newdb from template0 (which we assume doesn't change)
2. pg_dump template1 | pg_restore newdb
but pg_dump isn't terribly fast, and in any case this still has issues
--- eg, if DBA has dropped the public schema in template1, it will fail
to propagate that fact.

regards, tom lane

In response to

Browse pgsql-hackers by date

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