Re: Helper functions for wait_for_catchup() in Cluster.pm - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Helper functions for wait_for_catchup() in Cluster.pm
Date
Msg-id 20230213105802.5id6zja2bmkd4czo@alvherre.pgsql
Whole thread Raw
In response to Re: Helper functions for wait_for_catchup() in Cluster.pm  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: Helper functions for wait_for_catchup() in Cluster.pm
List pgsql-hackers
On 2023-Jan-26, Drouvot, Bertrand wrote:

> Hi,
> 
> On 1/26/23 10:42 AM, Alvaro Herrera wrote:
> > On 2023-Jan-26, Drouvot, Bertrand wrote:
> > 
> > > On 1/24/23 7:27 PM, Alvaro Herrera wrote:
> > 
> > > > 1. I don't think wait_for_write_catchup is necessary, because
> > > > calling wait_for_catchup() and omitting the 'mode' and 'lsn' arguments
> > > > would already do the same thing.
> 
> Having a closer look, it does not seem to be the case. The default mode
> in wait_for_catchup() is 'replay' and the default mode for the lsn is 'write'.
> 
> But in wait_for_write_catchup() we are making use of 'write' for both.

But that turns
 $node->wait_for_catchup('foobar', 'write')
into
 $node->wait_for_write_catchup('foobar');
so I don't see much value in it.  Also, the patch series from which this
patch spawned in the first place doesn't wait for write AFAICS.

After adding some more POD docs for it, I pushed the one for replay.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
¡Ay, ay, ay!  Con lo mucho que yo lo quería (bis)
se fue de mi vera ... se fue para siempre, pa toíta ... pa toíta la vida
¡Ay Camarón! ¡Ay Camarón!                                (Paco de Lucía)



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: psql - factor out echo code
Next
From: "shiy.fnst@fujitsu.com"
Date:
Subject: RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher