pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems With pg_dumpall and OIDs
5+ messages / 4 participants
[nested] [flat]

* Problems With pg_dumpall and OIDs
@ 2008-11-19 22:35 Tim Gustafson <tjg@soe.ucsc.edu>
  2008-11-19 22:48 ` Re: Problems With pg_dumpall and OIDs Milen A. Radev <milen@radev.net>
  2008-11-20 00:21 ` Re: Problems With pg_dumpall and OIDs Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 5+ messages in thread

From: Tim Gustafson @ 2008-11-19 22:35 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I currently have a old GForge installation running on Postgres 7.4.19.  GForge relies on the OID columns of their application tables for different things.  I'm trying to upgrade Postgres to 8.2, and in order to do so, I'm doing:

pg_dumpall --oids --clean > foo.sql

However, the "CREATE TABLE" statements in foo.sql don't have "WITH OIDS" specified, so when the tables are created in the new server, they are not getting OID columns, and then the data load portion of the SQL script appears to essentially be ignoring the OID information.

Is there an updated pg_dumpall that fixes this problem?  Was this a known issue in the 7.4.19 pg_dumpall that was fixed?  Any suggestions on how best to get the data out of the 7.4 server and in to the 8.2 server while maintaining all the OID information?

Thanks for all your help!

Tim Gustafson
SOE Webmaster
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problems With pg_dumpall and OIDs
  2008-11-19 22:35 Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
@ 2008-11-19 22:48 ` Milen A. Radev <milen@radev.net>
  2008-11-19 23:05   ` Re: Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
  1 sibling, 1 reply; 5+ messages in thread

From: Milen A. Radev @ 2008-11-19 22:48 UTC (permalink / raw)
  To: pgsql-admin

Tim Gustafson написа:
> Hello,
> 
> I currently have a old GForge installation running on Postgres 7.4.19.  GForge relies on the OID columns of their application tables for different things.  I'm trying to upgrade Postgres to 8.2, and in order to do so, I'm doing:
> 
> pg_dumpall --oids --clean > foo.sql
> 
> However, the "CREATE TABLE" statements in foo.sql don't have "WITH OIDS" specified, so when the tables are created in the new server, they are not getting OID columns, and then the data load portion of the SQL script appears to essentially be ignoring the OID information.
> 
> Is there an updated pg_dumpall that fixes this problem?  Was this a known issue in the 7.4.19 pg_dumpall that was fixed?  Any suggestions on how best to get the data out of the 7.4 server and in to the 8.2 server while maintaining all the OID information?
[...]

A workaround: temporarily turn to "on" the value off the "default_with_oids"
parameter in your configuration file (the defaults is "off").


-- 
Milen A. Radev




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problems With pg_dumpall and OIDs
  2008-11-19 22:35 Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
  2008-11-19 22:48 ` Re: Problems With pg_dumpall and OIDs Milen A. Radev <milen@radev.net>
@ 2008-11-19 23:05   ` Tim Gustafson <tjg@soe.ucsc.edu>
  2008-11-19 23:17     ` Re: Problems With pg_dumpall and OIDs Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tim Gustafson @ 2008-11-19 23:05 UTC (permalink / raw)
  To: pgsql-admin

> A workaround: temporarily turn to "on" the value off the
> "default_with_oids" parameter in your configuration file
> (the defaults is "off").

I tried that, but still got warning messages about no OID columns when I imported the data into 8.2.  :(  Unless maybe I'm doing something wrong.  I'm getting ready to "try again" shortly.

Tim Gustafson
SOE Webmaster
UC Santa Cruz
tjg@soe.ucsc.edu
831-459-5354





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problems With pg_dumpall and OIDs
  2008-11-19 22:35 Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
  2008-11-19 22:48 ` Re: Problems With pg_dumpall and OIDs Milen A. Radev <milen@radev.net>
  2008-11-19 23:05   ` Re: Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
@ 2008-11-19 23:17     ` Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Scott Marlowe @ 2008-11-19 23:17 UTC (permalink / raw)
  To: Tim Gustafson <tjg@soe.ucsc.edu>; +Cc: pgsql-admin

On Wed, Nov 19, 2008 at 4:05 PM, Tim Gustafson <tjg@soe.ucsc.edu> wrote:
>> A workaround: temporarily turn to "on" the value off the
>> "default_with_oids" parameter in your configuration file
>> (the defaults is "off").
>
> I tried that, but still got warning messages about no OID columns when I imported the data into 8.2.  :(  Unless maybe I'm doing something wrong.  I'm getting ready to "try again" shortly.

Did you reload / restart postgrseql after making the change?  When you
psql into the server, what does

show default_with_oids;

say?



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problems With pg_dumpall and OIDs
  2008-11-19 22:35 Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
@ 2008-11-20 00:21 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2008-11-20 00:21 UTC (permalink / raw)
  To: Tim Gustafson <tjg@soe.ucsc.edu>; +Cc: pgsql-admin

Tim Gustafson <tjg@soe.ucsc.edu> writes:
> I currently have a old GForge installation running on Postgres 7.4.19.  GForge relies on the OID columns of their application tables for different things.  I'm trying to upgrade Postgres to 8.2, and in order to do so, I'm doing:

> pg_dumpall --oids --clean > foo.sql

> However, the "CREATE TABLE" statements in foo.sql don't have "WITH
> OIDS" specified,

7.4's pg_dump doesn't know it ought to do that.  Try taking the dump
with the newer version's pg_dump(all).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2008-11-20 00:21 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 22:35 Problems With pg_dumpall and OIDs Tim Gustafson <tjg@soe.ucsc.edu>
2008-11-19 22:48 ` Milen A. Radev <milen@radev.net>
2008-11-19 23:05   ` Tim Gustafson <tjg@soe.ucsc.edu>
2008-11-19 23:17     ` Scott Marlowe <scott.marlowe@gmail.com>
2008-11-20 00:21 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox