Re: - Mailing list pgsql-hackers

From Laurette Cisneros
Subject Re:
Date
Msg-id Pine.LNX.4.44.0209101041370.19468-100000@visor.corp.nextbus.com
Whole thread Raw
In response to Re:  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
I do this to begin with (createdb -T template0 db).

FYI:  Here's what I've determined is the best thing to do:

1.  create the database from template0
2.  create the needed languages (plpgsql, plperl, plpython) in the database
3.  create the needed tables, functions, types, etc. from script files.
4.  restore only the data from the dump.

Seems to be the "easiest" and safest way to convert the database(s) to
7.3b1 (we have a mirad of databases for different needs each having their
own set of types, functions and languages that they use).  I'll let you
know if I run into problems with this - as this, in my opinion, should not!

Thanks to all for the help,

L.
On Tue, 10 Sep 2002, Bruce Momjian wrote:

> 
> I am confused.  This wording seems fine to me.
> 
> ---------------------------------------------------------------------------
> 
> Oliver Elphick wrote:
> > On Tue, 2002-09-10 at 00:50, Philip Warner wrote:
> > 
> > > ALTERNATIVELY, define the language in template1, then just edit dump1.lis 
> > > to remove the line for the language definition, and run pg_restore -L 
> > > dump1.lis.
> > 
> > That doesn't work for a dump and reload, because 7.3's pg_dumpall writes
> > a script to create the databases from template0 rather than template1.
> > 
> > The 7.3 documentation for pg_dump says:
> > 
> >     Notes
> >     
> >     If your installation has any local additions to the template1
> >     database, be careful to restore the output of pg_dump into a truly
> >     empty database; otherwise you are likely to get errors due to
> >     duplicate definitions of the added objects. To make an empty
> >     database without any local additions, copy from template0 not
> >     template1, for example:
> >     
> >         CREATE DATABASE foo WITH TEMPLATE = template0;
> >     
> > but this seems to be out of date.  pg_dumpall actually uses template0
> > itself.
> > 
> > -- 
> > Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> > Isle of Wight, UK                            
> > http://www.lfix.co.uk/oliver
> > GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
> >                  ========================================
> >      "Draw near to God and he will draw near to you.  
> >       Cleanse your hands, you sinners; and purify your  
> >       hearts, you double minded."       James 4:8 
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > 
> 
> 

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
----------------------------------
A wiki we will go...



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [JDBC] problem with new autocommit config parameter and
Next
From: "scott.marlowe"
Date:
Subject: Re: problem with new autocommit config parameter and jdbc