Jan Wieck <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to