postgresql data transfer from 9.3 to 9.4

Started by 許耀彰about 8 years ago2 messagesbugs
Jump to latest
#1許耀彰
kpm906@gmail.com

Dear Support Team,
We face a question about migrating postgresql from 9.3 to 9.4. Because our
original postgresql is 9.3. And we use dump command to dump all record as
shown as below:
pg_dump dbname > outfile

At the same time , we update postgresql from 9.3 to .9.4 And then remove
9.3 postgresql. Finally we use command as listed as below to import all
record to 9.4 postgresql.
psql dbname < infile

But at the transfer process, it showed the error message as shown as the
attachment. How can we normally transfer 9.3 records to 9.4 postgresql in
the same server? Thanks for your kindly assistance.
Best Regards, Anderson Hsu

<https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;
不含病毒。www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Attachments:

200037053x0ai05gYR.pngimage/png; name=200037053x0ai05gYR.pngDownload
#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: 許耀彰 (#1)
Re: postgresql data transfer from 9.3 to 9.4

Hi

2018-02-11 9:28 GMT+01:00 許耀彰 <kpm906@gmail.com>:

Dear Support Team,
We face a question about migrating postgresql from 9.3 to 9.4. Because our
original postgresql is 9.3. And we use dump command to dump all record as
shown as below:
pg_dump dbname > outfile

At the same time , we update postgresql from 9.3 to .9.4 And then remove
9.3 postgresql. Finally we use command as listed as below to import all
record to 9.4 postgresql.
psql dbname < infile

But at the transfer process, it showed the error message as shown as the
attachment. How can we normally transfer 9.3 records to 9.4 postgresql in
the same server? Thanks for your kindly assistance.
Best Regards, Anderson Hsu

1. You should to use dump from target version, not from original. There is
not problem to have more installed version of postgresql client software
(pg_dump and other).

2. what you see is last error, you should to show first error

run:
psql -v ON_ERROR_STOP=1 dbname < infile

3. removing original release before successful migration is wrong

4. for these versions, you can migrate by faster pg_upgrade command

Regards

Pavel

Show quoted text

<https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;
不含病毒。www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail&gt;
<#m_2239941669391310665_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>