Re: Helper functions for wait_for_catchup() in Cluster.pm

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Helper functions for wait_for_catchup() in Cluster.pm
Date: 2023-01-24 18:27:28
Message-ID: 20230124182728.bp6cyo74c77hb4vn@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Looking again, I have two thoughts for making things easier:

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. So what we should do is patch places
that currently give those two arguments, so that they don't.

2. Because wait_for_replay_catchup is an instance method, passing the
second node as argument is needlessly noisy, because that's already
known as $self. So we can just say

$primary_node->wait_for_replay_catchup($standby_node);

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-01-24 18:42:17 Re: wake up logical workers after ALTER SUBSCRIPTION
Previous Message Tom Lane 2023-01-24 18:13:55 Re: wake up logical workers after ALTER SUBSCRIPTION