pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Sudakov <vas@sibptus.ru>
To: pgsql-admin@lists.postgresql.org
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Subject: Re: A streaming replica catching up
Date: Thu, 22 Apr 2021 15:43:23 +0700
Message-ID: <YIE3K1b+UkpnLggS@admin.sibptus.ru> (raw)
In-Reply-To: <8ec1143e5f1e45714b415076b3ad7533346e2734.camel@cybertec.at>
References: <YIDqmtsUEpTK8Krp@admin.sibptus.ru>
	<8ec1143e5f1e45714b415076b3ad7533346e2734.camel@cybertec.at>

Laurenz Albe wrote:
> On Thu, 2021-04-22 at 10:16 +0700, Victor Sudakov wrote:
> > After a streaming standby has been down for a time, I know of two
> > options for it to catch up with the master:
> > 
> > 1. The replica can fetch all the necessary WAL records via the
> > replication protocol from the master (unless max_slot_wal_keep_size is
> > not the default -1, all the required WAL archives should be available from
> > the master).
> > 
> > 2. The replica can be provided with a restore_command and will fetch
> > all WAL files from the WAL archive before starting streaming WAL from
> > the master.
> > 
> > Which is the preferred way? 
> > 
> > Of course if max_slot_wal_keep_size is limited, the second options seems
> > the only safe one.
> > 
> > OTOH, if the master does not write to a WAL archive, only the first
> > option is left to us.
> 
> Both methods are equally feasible.  Which one you choose depends on
> your situation, just as you describe in the last two sentences.

I see.

It is also interesting when there is Patroni involved, would it be a good
idea to provide Patroni nodes with a restore_command? I'm afraid it can
interfere with Patroni failover/switchover operations.

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet





view thread (3+ messages)

Message-ID: <YIE3K1b+UkpnLggS@admin.sibptus.ru>
Permalink:  ../YIE3K1b+UkpnLggS@admin.sibptus.ru/
Also on:    postgresql.org/message-id/YIE3K1b+UkpnLggS@admin.sibptus.ru

 · 

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: vas@sibptus.ru, pgsql-admin@lists.postgresql.org, laurenz.albe@cybertec.at
  Subject: Re: A streaming replica catching up
  In-Reply-To: <YIE3K1b+UkpnLggS@admin.sibptus.ru>

* 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