Re: Utility database (Was: RE: Autovacuum in the backend)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Magnus Hagander <mha(at)sollentuna(dot)net>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Utility database (Was: RE: Autovacuum in the backend)
Date: 2005-06-17 14:09:10
Message-ID: 20281.1119017350@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> So may I propose to have a pg_system database created by initdb, as a
>> copy from template1 in 8.1?

Seems like a bizarre choice of name. Why not "default"?

> But then dbas will block off access to that db, or drop it and we're
> back to square one...

Don't see why they would. Let's review what we have here:

Database Function(s)

template0 guaranteed-virgin template for CREATE DATABASE

template1 installation-default template for CREATE DATABASE
default database to connect to for clients

(I don't think I'm missing anything --- can anyone think of a purpose
I have forgotten?)

If we split template1's functions as

template1 installation-default template for CREATE DATABASE

default default database to connect to for clients

then it becomes fairly reasonable for DBAs to block access to template1
after they've installed any installation-default stuff they want in it.
There isn't any particular reason to block access to "default", unless
you don't want to have a shared database at all --- in which case you'd
probably just drop it.

One argument against this is that it'd mean another copy of the system
catalogs in a standard installation. That's been running three to five
megabytes over the last few releases. Disk space is pretty cheap these
days, but we do get occasional complaints from people who wish the
footprint was smaller.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-06-17 14:12:41 Re: Utility database (Was: RE: Autovacuum in the backend)
Previous Message Tom Lane 2005-06-17 13:54:52 Re: Autovacuum in the backend