pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edward J. Sabol <edwardjsabol@gmail.com>
To: Jef Mortelle <jefmortelle@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Upgrade from PG12 to PG
Date: Thu, 20 Jul 2023 09:29:25 -0400
Message-ID: <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com> (raw)
In-Reply-To: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com>
References: <3901e0da-819b-5b6d-bb57-c29f6d384725@gmail.com>

On Jul 20, 2023, at 7:23 AM, Jef Mortelle <jefmortelle@gmail.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






view thread (18+ messages)  latest in thread

Message-ID: <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com>
Permalink:  ../02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com/
Also on:    postgresql.org/message-id/02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: edwardjsabol@gmail.com, jefmortelle@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Upgrade from PG12 to PG
  In-Reply-To: <02E1F4FD-C346-4169-86F5-2CB17232D838@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox