pgsql/src/backend/commands (dbcommands.c)

Started by Tom Laneover 25 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Date: Tuesday, November 14, 2000 @ 13:37:41
Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
from hub.org:/home/projects/pgsql/tmp/cvs-serv58825/src/backend/commands

Modified Files:
dbcommands.c

----------------------------- Log Message -----------------------------

Extend CREATE DATABASE to allow selection of a template database to be
cloned, rather than always cloning template1. Modify initdb to generate
two identical databases rather than one, template0 and template1.
Connections to template0 are disallowed, so that it will always remain
in its virgin as-initdb'd state. pg_dumpall now dumps databases with
restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
This allows proper behavior when there is user-added data in template1.
initdb forced!

#2Hiroshi Inoue
Inoue@tpf.co.jp
In reply to: Tom Lane (#1)
Re: pgsql/src/backend/commands (dbcommands.c)

tgl@postgresql.org wrote:

Date: Tuesday, November 14, 2000 @ 13:37:41
Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
from hub.org:/home/projects/pgsql/tmp/cvs-serv58825/src/backend/commands

Modified Files:
dbcommands.c

----------------------------- Log Message -----------------------------

Extend CREATE DATABASE to allow selection of a template database to be
cloned, rather than always cloning template1. Modify initdb to generate
two identical databases rather than one, template0 and template1.
Connections to template0 are disallowed, so that it will always remain
in its virgin as-initdb'd state. pg_dumpall now dumps databases with
restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0.
This allows proper behavior when there is user-added data in template1.
initdb forced!

BufferSync() after heap_insert() seems to be lost.
Connection to a database calls GetRawDatabaseinfo()
which doesn't look at shared buffer pool at all.
Connection to a database immediately after the database
was created fails under WAL e.g. in regression test.

Regards.
Hiroshi Inoue

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hiroshi Inoue (#2)
Re: pgsql/src/backend/commands (dbcommands.c)

Hiroshi Inoue <Inoue@tpf.co.jp> writes:

BufferSync() after heap_insert() seems to be lost.
Connection to a database calls GetRawDatabaseinfo()
which doesn't look at shared buffer pool at all.
Connection to a database immediately after the database
was created fails under WAL e.g. in regression test.

Hmm, perhaps I misunderstood what that was for. I moved it up to
before the system('cp -r') operation in hopes of ensuring that the
source database was up-to-date. But maybe we need another one at
the bottom.

regards, tom lane