pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Karthik Krishnakumar <karthikk@zohocorp.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Upgrading postgres quickly, without downtime.
Date: Fri, 17 Feb 2023 08:00:48 -0500
Message-ID: <6225428d-ed25-051e-3991-44d330786649@sqlexec.com> (raw)
In-Reply-To: <28454b4ba1d1cad92d6eb40e68265c728b0c830f.camel@cybertec.at>
References: <1865eb25ef2.12bfda8e286305.6340275209123460062@zohocorp.com>
	<28454b4ba1d1cad92d6eb40e68265c728b0c830f.camel@cybertec.at>

pg_upgrade --link is the way to go for sure, but pay attention to the 
details surrounding it for primary and replicas.

Regards,
Michael Vitale

Laurenz Albe wrote on 2/17/2023 7:13 AM:
> On Fri, 2023-02-17 at 15:01 +0530, Karthik Krishnakumar wrote:
>> I have a number of pg servers(~100 (each with a couple of replicas, so 300
>> clusters in total), each with ~2TB data) that is running version 10.
>> I am planning on upgrading to PG 15 and looking for ways to get it done
>> without downtime and quickly.
>> There seem to be a couple of ways to do this -
>> 1. dump/restore or upgrade -> but this causes downtime.
>> 2. logical replication/pglogical -> this is going to be slow, adds additional
>>     load on the master, and it isnt recommended to do DDL during time.
>>
>> I do have daily backups of these databases.
>> Is there a way I can use these daily backups to upgrade to 15 and sync the changes for the day alone?
>> I can code in C/scripts, and know bit of internals and wanted to ask where to start on this.
>> I am also open to any alternate ideas.
> Take 10 minutes downtime and use "pg_upgrade --link".
>
> Yours,
> Laurenz Albe
>
>


Regards,

Michael Vitale

Michaeldba@sqlexec.com <mailto:michaelvitale@sqlexec.com>

703-600-9343

Attachments:

  [image/jpeg] pgadvanced3.jpg (20.6K, ../6225428d-ed25-051e-3991-44d330786649@sqlexec.com/3-pgadvanced3.jpg)
  download | view image

view thread (3+ messages)

Message-ID: <6225428d-ed25-051e-3991-44d330786649@sqlexec.com>
Permalink:  ../6225428d-ed25-051e-3991-44d330786649@sqlexec.com/
Also on:    postgresql.org/message-id/6225428d-ed25-051e-3991-44d330786649@sqlexec.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: MichaelDBA@sqlexec.com, laurenz.albe@cybertec.at, karthikk@zohocorp.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Upgrading postgres quickly, without downtime.
  In-Reply-To: <6225428d-ed25-051e-3991-44d330786649@sqlexec.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