Re: psql backward compatibility

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Stephen Haddock <haddock(dot)stephenm(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: psql backward compatibility
Date: 2020-11-18 16:13:27
Message-ID: 60428523-c916-9962-3875-d9cca1644f8f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/18/20 8:05 AM, Stephen Haddock wrote:
> Hello,
>
> When upgrading an older version of postgres, version 8.4 for example, to
> a newer version such as 9.6, does the data have to be migrated immediately?
>
> It looks like the recommended method is to dump the data, upgrade,
> initialize a new cluster, and then restore the dumped data into the
> newer version. My question is whether the data dump and restore must be
> done immediately. It appears that 9.6 is able to run against the older
> cluster (DB service starts, queries work, etc), and the data could be
> migrated days or weeks later. I don't know if that is asking for issues
> down the line though such as 9.6 corrupting the data due to
> incompatibilities between the two versions.

https://www.postgresql.org/docs/9.6/app-pgdump.html

"Because pg_dump is used to transfer data to newer versions of
PostgreSQL, the output of pg_dump can be expected to load into
PostgreSQL server versions newer than pg_dump's version. pg_dump can
also dump from PostgreSQL servers older than its own version.
(Currently, servers back to version 7.0 are supported.) "

The above is for Postgres 9.6 version of pg_dump. Newer versions(10+) go
back to Postgres 8.0. You can dump the old server at anytime. The
important thing to remember is to dump the old server using the new
servers version of pg_dump. So in your case pg_dump(9.6) against
server(8.4).

>
> Thanks!

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-11-18 16:16:43 Re: psql backward compatibility
Previous Message David G. Johnston 2020-11-18 16:12:52 Re: psql backward compatibility