Re: Upgrading 6 versions between 2 systems

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Upgrading 6 versions between 2 systems
Date: 2026-09-15 12:01:29
Message-ID: abc0f870-c97b-cbcc-d8a3-7d6b3de620c6@appl-ecosys.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Previous Message Alban Hertroys 2026-09-15 08:02:13 Re: Upgrading 6 versions between 2 systems