Re: Upgrading 6 versions between 2 systems

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Upgrading 6 versions between 2 systems
Date: 2026-09-15 08:02:13
Message-ID: 0392D5EB-21FF-4BE4-9FAC-A4F7546C88D3@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On 14 Sep 2026, at 23:44, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:
>
> On Mon, 14 Sep 2026, Ron Johnson wrote:
>
>> Yes. Note, though, that a single .sql file is the *slow* way to
>> export/import a database, especially if it's of any size.
>
> Ron,
>
> My databases are small and I'll transfer them one-at-a-time rather than the
> whole custer itself.

Rich,

Just a little heads-up:

If you’re dumping one database at a time, that doesn’t include any of the database roles or users you may have added. Roles (and users) are stored with the cluster, not per database.

That’s where the below mentioned `pg_dumpall --globals-only` feature comes into play. You don’t need the parallel stuff, but the globals bit could be important.

With the rest cut out, that leaves:

>
>> Current system:
>> cd /path/to/backups
>> pg_dumpall --globals-only > globals_127.sql

...

>> New system:
>> cd /path/to/backups
>> psql -af globals_127.sql

Regards,

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2026-09-15 12:01:29 Re: Upgrading 6 versions between 2 systems
Previous Message Ron Johnson 2026-09-15 02:33:19 Re: Upgrading 6 versions between 2 systems