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

From Alban Hertroys
Subject Re: Upgrading 6 versions between 2 systems
Date
Msg-id 0392D5EB-21FF-4BE4-9FAC-A4F7546C88D3@gmail.com
Whole thread
Responses Re: Upgrading 6 versions between 2 systems
List pgsql-general

> On 14 Sep 2026, at 23:44, Rich Shepard <rshepard@appl-ecosys.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.


pgsql-general by date:

Previous
From: Justin
Date:
Subject: Re: PostgreSQL Service Unable to Start After Archive Log delete
Next
From: Rich Shepard
Date:
Subject: Re: Upgrading 6 versions between 2 systems