[PERFORM] Postgres version change - pg_dump
Hi All, Thanks to everyone for helping with my previous questions. I have a test database running on Postgres 7.3.2. version -PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.96 I have another server where a newer version of postgres that came with the Fedora Core 3 package installed. version -PostgreSQL 7.4.6 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6) I would like to do a pg_dump on the test database, and restore it in the new database on Postgres 7.4.6. I would like to know if there would be any problem due to the postgres version/OS change. If so, could someone tell me what precautions I can take to avoid any problems? Thanks in advance, Saranya Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more.
Re: [PERFORM] Postgres version change - pg_dump
On Mon, Dec 20, 2004 at 06:40:34 -0800, sarlav kumar [EMAIL PROTECTED] wrote: I would like to do a pg_dump on the test database, and restore it in the new database on Postgres 7.4.6. I would like to know if there would be any problem due to the postgres version/OS change. If so, could someone tell me what precautions I can take to avoid any problems? You should use the 7.4.6 version of pg_dump to dump the old database. Note you still need to be running the 7.3.2 server for the old database. pg_dump will be just acting like a client connecting over the network and will work with older versions of the server. ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PERFORM] Postgres version change - pg_dump
sarlav kumar wrote, On 2004-12-20 15:40: I would like to do a pg_dump on the test database, and restore it in the new database on Postgres 7.4.6. I would like to know if there would be any problem due to the postgres version/OS change. If so, could someone tell me what precautions I can take to avoid any problems? Apart from using the pg_dump from 7.4.6 (see Bruno's answer), you should take care to use the same locale in the new database cluster. I have had problems in the past with unique constraints that could not be restored due to different locale settings. See here: http://www.spinics.net/lists/pgsql/msg05363.html In my case it was not enough to create the database with a different encoding, I had to re-initdb the whole cluster :-/ cheers, stefan ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PERFORM] Postgres version change - pg_dump
Hi, From what I understand, I need to execute the pg_dump command from the new server( so that it will use the 7.4.6 version), but connect to the old DB.Am I right? Thanks, SaranyaBruno Wolff III [EMAIL PROTECTED] wrote: On Mon, Dec 20, 2004 at 06:40:34 -0800,sarlav kumar <[EMAIL PROTECTED]>wrote: I would like to do a pg_dump on the test database, and restore it in the new database on Postgres 7.4.6. I would like to know if there would be any problem due to the postgres version/OS change. If so, could someone tell me what precautions I can take to avoid any problems?You should use the 7.4.6 version of pg_dump to dump the old database. Noteyou still need to be running the 7.3.2 server for the old database.pg_dump will be just acting like a client connecting over the networkand will work with older versions of the server. Do you Yahoo!? Jazz up your holiday email with celebrity designs. Learn more.
Re: [PERFORM] Postgres version change - pg_dump
Hi Sarlav, From what I understand, I need to execute the pg_dump command from the new server( so that it will use the 7.4.6 version), but connect to the old DB. Am I right? Basically. The truth is Sarlav, that any pg_dump version before the new 8.0 version is likely to have errors restoring. You should restore the dump like this: psql -f dump.sql database And then when you get errors, you will see the line number of the error. Then you can edit the dump to fix it. Chris ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])