Re: pgsql: Implement pg_wal_replay_wait() stored procedure

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Alexander Korotkov <akorotkov(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Date: 2024-09-27 04:57:23
Message-ID: ZvY7M5afmuSgoqUg@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Sep 27, 2024 at 01:35:23PM +0900, Michael Paquier wrote:
> I would suggest to keep things simple and have one single function
> rather than introduce two more pg_proc entries with slight differences
> in their error reporting, making the original function return a text
> about the reason of the failure when waiting (be it a timeout,
> success, promotion or outside recovery).

More to the point here. I am not sure what's the benefit of having a
procedure, while we have been using SQL functions for similar purposes
in xlogfuncs.c for years. And what you have here can also be coupled
with more complex logic in SQL queries.
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2024-09-27 13:25:38 pgsql: pg_verifybackup: Verify tar-format backups.
Previous Message Michael Paquier 2024-09-27 04:35:23 Re: pgsql: Implement pg_wal_replay_wait() stored procedure

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-09-27 05:14:37 Re: Conflict Detection and Resolution
Previous Message Amit Langote 2024-09-27 04:51:58 Re: ALTER TABLE ONLY .. DROP CONSTRAINT on partitioned tables