Re: [ADMIN] [SQL] PostgreSQL 9.3 DB initialization issue - Mailing list pgsql-admin

From Adrian Klaver
Subject Re: [ADMIN] [SQL] PostgreSQL 9.3 DB initialization issue
Date
Msg-id 79f8f2b6-f78c-f5a9-1a90-e757d1311dcd@aklaver.com
Whole thread Raw
In response to Re: [ADMIN] [SQL] PostgreSQL 9.3 DB initialization issue  (Steve Midgley <science@misuse.org>)
List pgsql-admin
On 05/13/2017 02:50 PM, Steve Midgley wrote:
>
>

>
> I am by no means an expert on any of this, but Adrian, I think you have
> a typo in your instructions? Should it read:
>
>   "use the *[9.2]* pg_dumpall to dump the 9.2 data and then the 9.3
> pg_restore to restore it into the 9.3 instance." (in the original it
> said [9.3] where my brackets are).
>
> I think you meant to say that v 9.2 server binary should be used to call
> pg_dumpall (and run against the v9.2 running server instance), and then
> the resulting dump file can be read into the 9.3 server by using the
> v9.3 binary for pg_restore. The pg_restore (v9.3) command will operate
> using source files created by pg_dumpall, and load that into 9.3 running
> server instance.

Well pg_dump(all) is backwards compatible, so the 9.3 version can dump
Postgres versions going back to 7.0. I have always been told that using
the newer binary against an older server is better as it will 'know'
about changes in the newer version:

https://www.postgresql.org/docs/9.3/static/upgrading.html

17.6.1. Upgrading Data via pg_dump

"It is recommended that you use the pg_dump and pg_dumpall programs from
the newer version of PostgreSQL, to take advantage of enhancements that
might have been made in these programs. Current releases of the dump
programs can read data from any server version back to 7.0."

That being said, given that it is only a single version jump using the
9.2 version of pg_dump(all) will most likely work without a hitch.

>
> If I'm wrong about this, please correct me. But given the context of
> debugging on this email thread, it seemed like I should point this
> (possible) typo out, so there was no ambiguity for Ashish and his team.
>
> Steve


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-admin by date:

Previous
From: Steve Midgley
Date:
Subject: Re: [ADMIN] [SQL] PostgreSQL 9.3 DB initialization issue
Next
From: Jakub Jedelský
Date:
Subject: [ADMIN] Autovacuum of pg_database