Re: Upgrade problems with OID type ... - Mailing list pgsql-admin

From Daniel Rubio
Subject Re: Upgrade problems with OID type ...
Date
Msg-id 40ED1DDD.2050509@tinet.org
Whole thread Raw
In response to Upgrade problems with OID type ...  (Daniel Rubio <drubior@tinet.org>)
List pgsql-admin
juanmime@ono.com wrote:

> Hello Daniel,
>
> Have you tried using the -Ft option when doing the dump, and pg_restore
> instead of psql ?

I've seen the thread you started with a similar problem,  and it has
been useful to solve the problem with the concrete database, but my
problem is that we host 20 different databases (and growing)for hosting
clients and we don't know who's using OID's and who's not.

I think that the Chapter 9.3 (Migration between releases) would have to
concrete that the OIDs doesn't work with the method explained (despite
pg_dumpall has the -o option) and how to make the migration process in
this case.

I have not encoutered too much documentation about it, and finally I've
followed this process (could be useful for someone):


1.-Search the databases having OIDs ( \dl command on each one), this is
easy to automate via shell script ( but I did'nt make it).

2.-With the pg_dumplo utility (contrib directory), backup the OID
objects for each database discovered in 1

../../pg-7.4.3/bin/pg_dumplo -s /tmp/dumpoids -d database_name -e

3.-Run the pg_dumpall

../bin/pg_dumpall -o -c -p 5432  | /apps/pg-7.4.3/bin/psql -d template1
-p 5433 1>/tmp/sortidaimport 2>/tmp/sortidaerror

4.-Import the OIDs to the new postgres using pg_dumplo (for each
database with OIDs)

../../pg-7.4.3/bin/pg_dumplo -s /tmp/dumpoids -d pragenda -o 5433 -i

It worked for me ...

If anyone knows a better, faster or automatic process to perform the
upgrade I'll be pleased to know it ...

And sorry for my poor english ...

>
>
>>-- Mensaje original --
>>Date: Tue, 06 Jul 2004 11:06:25 +0200
>>From: Daniel Rubio <drubior@tinet.org>
>>To: pgsql-admin@postgresql.org
>>Subject: [ADMIN] Upgrade problems with OID type ...
>>
>>
>>Hi all!
>>
>>I'm trying to upgrade from 7.3.2 to 7.4.3 but I've a problem with a
>>database (1 I know, there could be more) containing a table with an oid
>
>
>>type field.
>>
>>I run the migration doing:
>>
>>../bin/pg_dumpall -o -p 5432 | /apps/pgs-7.4.3/bin/psql -d template1 -p
>
>
>>5433 1>/tmp/out 2>/tmp/err
>>
>>The command runs fine, with no ERRORS on the output files, but when the
>
>
>>user accesses their application (web) the images he was storing does'nt
>
>
>>appear, and I can see errors like this on the logfile:
>>
>>2004-07-06 09:54:52 ERROR:  large object 417988 does not exist
>>
>>First I was doing the dump without the -o, but now I use it and the
>>problem persists ... Ideas?
>>
>>Thanks in advance ...
>>--
>>********************************************************
>>Daniel Rubio Rodríguez
>>OASI (Organisme Autònom Per la Societat de la Informació)
>>c/ Assalt, 12
>>43003 - Tarragona
>>Tef.: 977.244.007 - Fax: 977.224.517
>>e-mail: drubio a oasi.org
>>********************************************************
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 2: you can get off all lists at once with the unregister command
>>   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
>
>
>


--
********************************************************
Daniel Rubio Rodríguez
OASI (Organisme Autònom Per la Societat de la Informació)
c/ Assalt, 12
43003 - Tarragona
Tef.: 977.244.007 - Fax: 977.224.517
e-mail: drubio a oasi.org
********************************************************

pgsql-admin by date:

Previous
From: Werner Bohl
Date:
Subject: DB error recovery
Next
From: Hilary Forbes
Date:
Subject: Re: Problems upgrading to 7.4