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 7614.1119791690@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fundamental error in "no WAL log" index/file creation  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Jan Wieck <JanWieck@Yahoo.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 about1. Clone newdb from template0 (which we assume doesn't change)2. pg_dump template1 |
pg_restorenewdb
 
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


pgsql-hackers by date:

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