Unix Technical Forum

Major Problems with pg_dump

This is a discussion on Major Problems with pg_dump within the pgsql Novice forums, part of the PostgreSQL category; --> Seems like I missed a peece of Doc somewhere. But in my tries to save and restore my databases ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:20 PM
=?iso-8859-1?Q?K=D6PFERL_Robert?=
 
Posts: n/a
Default Major Problems with pg_dump

Seems like I missed a peece of Doc somewhere.

But in my tries to save and restore my databases schema using pg_dump I got
major problems.
Please give me a tip, what's the trick.

Working all with output as SQL
1. Dumping data and schema separately works, but restoring them with psql
fails with the data because of unsatisfied constrains. Tables are filled in
the wrong order. Can the order be changed or a "SET constrains all deferred"
be included in the output?

2. Dumping schema+data types and domains are dumped in the wrong order.
Types don't get defined due to missing domains. Hmmm?

3. pg_dump writes FUNCTIONs with $$ instead of ' as frame for their body.
However postgres seems to not like that. Why, how, I dunno?

4. pg_dump writes calls to functions into the file:
SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequenc e('"CDRs"', 'Id'),
2, true);
however the function can't be found by postgres. Since this call seems
importand, what went wrong with postgres or template1?


Thanks,
I am using pg_dump from PgAdmi III 1.3
Postgres 8 beta
and psql from PgSQL 7.4.? from Cygwin

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:20 PM
Tom Lane
 
Posts: n/a
Default Re: Major Problems with pg_dump

=?iso-8859-1?Q?K=D6PFERL_Robert?= <robert.koepferl@sonorys.at> writes:
> 2. Dumping schema+data types and domains are dumped in the wrong order.
> Types don't get defined due to missing domains. Hmmm?


> 3. pg_dump writes FUNCTIONs with $$ instead of ' as frame for their body.
> However postgres seems to not like that. Why, how, I dunno?


Apparently you are dumping with an 8.0 pg_dump and trying to load into a
previous-generation backend. That is never guaranteed to work and it's
particularly likely to not work from 8.0 to older backends.

However, 8.0 pg_dump should have solved the incorrect-dump-order
problem. Could we see a specific example of #2 occurring with the 8.0
dump?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com