Re: transitioning postgres oid

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Robert Abbate <cogea(at)ectisp(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: transitioning postgres oid
Date: 2002-05-14 14:05:22
Message-ID: 20020515000522.D10256@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 14, 2002 at 09:21:37AM -0500, Robert Abbate wrote:
> This doesn't work because the old databases are not accessible with the new
> Postgres installation. I get the following error:
>
>
> Connection to database '26955' failed.
> FATAL 1: Database "26955" does not exist in the system catalog.
>
>
> Does anyone know how do you update the system catalog to include an old
> Postges installation OID? I have old databases just sitting there and I
> can't seem to include them in the new installation. I cannot include them in
> the new installation to run pg_dump.

The name,oid mapping is stored in pg_database which should have been kept.
If you're going to copy the datafiles directly, you have to copy the entire
tree incling the xlog and global directory. Without the xlog directory you
don't have a database.

Ofcourse, the most reliable method is pg_dump before and psql < dump after.

HTH,

> ----- Original Message -----
> From: "Thomas Beutin" <tyrone(at)laokoon(dot)IN-Berlin(dot)DE>
> To: "Robert Abbate" <cogea(at)ectisp(dot)net>
> Sent: Tuesday, May 14, 2002 2:26 AM
> Subject: Re: [GENERAL] transitioning postgres oid
>
>
> > Hi,
> >
> > executing the shell command "pg_dump --help" shows the options
> > of pg_dump available in Your installation. You should try to
> > dump with the "-o" resp "--oids" option and inserting in the
> > data into the fresh installation. Maybe this helps.
> >
> > -tb
> >
> > On Tue, May 14, 2002 at 01:26:47AM -0500, Robert Abbate wrote:
> > > Hi. I had to re-install Postgres and I was wondering how to do I get the
> old OID numbers (which have all my databases) incorporated into the fresh
> installation? I tried just putting the old "base" directory in, but it
> doesn't work. Is there some other way to do this or is it even possible at
> all?
> > >
> > > Please..any suggestions. Otherwise I lose my database data.
> > >
> > > Thanks,
> > > Robert
> >
> > --
> > Thomas Beutin tb(at)laokoon(dot)IN-Berlin(dot)DE
> > Beam me up, Scotty. There is no intelligent live down in Redmond.
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com)
> Version: 6.0.319 / Virus Database: 178 - Release Date: 1/28/02
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Canada, Mexico, and Australia form the Axis of Nations That
> Are Actually Quite Nice But Secretly Have Nasty Thoughts About America

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Koenig 2002-05-14 14:15:05 Using COPY
Previous Message Tom Lane 2002-05-14 13:58:51 Re: restoreing dumps fail