Re: Upgrading 6 versions between 2 systems - Mailing list pgsql-general

From Rich Shepard
Subject Re: Upgrading 6 versions between 2 systems
Date
Msg-id abc0f870-c97b-cbcc-d8a3-7d6b3de620c6@appl-ecosys.com
Whole thread
In response to Re: Upgrading 6 versions between 2 systems  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
On Tue, 15 Sep 2026, Alban Hertroys wrote:

> 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

Alban,

I was not aware of this because in the past all version upgrades were on the
same host.

A valuable lesson. Thanks very much.

Regards,

Rich





Attachment

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Upgrading 6 versions between 2 systems
Next
From: Adrian Klaver
Date:
Subject: Re: pg_upgrade --link