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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| =?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) |