Re: [PATCHES] default database creation with initdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, "Magnus Hagander" <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] default database creation with initdb
Date: 2005-06-21 13:56:36
Message-ID: 2221.1119362196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
>> Another point is that Dave added code to pg_dumpall to not dump the
>> postgres database.

> My reading of that code was that I merely stopped it dumping the CREATE
> DATABASE statement (and the ACL) for the database, /not/ the actual
> contents - in the same way as is done for template1. The theory being
> that if you are reloading from into a freshing initdb'ed cluster,
> postgres will already exist so doesn't need to be recreated.

D'oh ... you're right of course. Will fix (and add some comments).

I wonder though if this code isn't a little broken. It should skip the
CREATE DATABASE certainly, but what about the ACL and dumpDatabaseConfig
parts? I suspect those got added in at a handy place without enough
thought taken as to whether they should be excluded for template1.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-21 14:04:41 Re: [PATCHES] default database creation with initdb
Previous Message Tom Lane 2005-06-21 13:45:01 Re: Schedule for 8.1 feature freeze