Re: [HACKERS] Re: New init script and upgrade attempt: failed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: New init script and upgrade attempt: failed
Date
Msg-id 27940.938475340@sss.pgh.pa.us
Whole thread Raw
In response to Re: New init script and upgrade attempt: failed  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-hackers
Lamar Owen <lamar.owen@wgcr.org> writes:
> Hackers:  should pg_dumpall dump template1??  If not, why not?  What
> EXACTLY does template1 do in the larger scheme of things? If dumping
> template1 is desired -- it can be arranged in the upgrade by modifying
> pg_dumpall.

template1 is copied verbatim by CREATE DATABASE to produce the initial
state of any new database.  So, people might reasonably put stuff in
it that they want copied to new DB's.  The most common example is
doing a createlang to create non-default PLs (plpgsql etc); you can do
it just once in template1 instead of every time you make a DB, assuming
that you want plpgsql in all your DBs.  I guess there could be reasons
for making a user table in template1 to be copied to each new DB.

If pg_dumpall doesn't dump the (user-added) contents of template1,
I think that's an oversight...

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] _text problem in union
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Profiling?]