Re: Upgrade from PG12 to PG

From: Jef Mortelle <jefmortelle(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Upgrade from PG12 to PG
Date: 2023-07-20 13:42:37
Message-ID: 19cbcef2-b7e9-e696-5a64-bd7098126cc4@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

Alsready tried to use --link and --jobs, but you cannot ommit the
"select  lo_unlink ...."   for every rows containing datatype text in
your database that the pg_* program creates in the export/dump file.
These select's takes a lot of time, hours ...

The pg_dumpall => size of the dumpfile is much more than the size of
exported database

Kind regards

On 20/07/2023 15:29, Edward J. Sabol wrote:
> On Jul 20, 2023, at 7:23 AM, Jef Mortelle <jefmortelle(at)gmail(dot)com> wrote:
>> I use /usr/lib/postgresql15/bin/pg_upgrade -v -p 5431 -P 5432
>>
>> I takes a lot of time, more than 6 hours
> I'm in the middle of a similar database migration myself, but I'm coming from 10.23.
>
> Have you considered adding the --link and --jobs=NN (where NN is the number of CPU cores on your server minus 2 or something like that) to your pg_upgrade command? I wonder if that would speed things up significantly.
>
> Also, if your file system supports reflinks (Linux kernel 4.5 and XFS with reflink support activated or Btrfs or macOS APFS), then use --clone instead of --link.
>
> Good luck,
> Ed
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jef Mortelle 2023-07-20 13:46:19 Re: Upgrade from PG12 to PG
Previous Message Edward J. Sabol 2023-07-20 13:29:25 Re: Upgrade from PG12 to PG