pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Alexander Korotkov <akorotkov@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Date: Fri, 27 Sep 2024 13:57:23 +0900
Message-ID: <ZvY7M5afmuSgoqUg@paquier.xyz> (raw)
In-Reply-To: <ZvY2C8N4ZqgCFaLu@paquier.xyz>
References: <E1sZwuz-002NPQ-Lc@gemulon.postgresql.org>
	<18c0fa64-0475-415e-a1bd-665d922c5201@eisentraut.org>
	<CAPpHfduQPYWATA2rfbYXsXM+Yspn1nQVwrEs=p303O428J57Yg@mail.gmail.com>
	<ZtT4dhlxuxdPPI8t@paquier.xyz>
	<CAPpHfdubNR746cbxRvs8C0MmNvUTtrjWwZ=RzcB5i_4kUz+RuQ@mail.gmail.com>
	<ZtUF17gF0pNpwZDI@paquier.xyz>
	<CAPpHfduN68AzUHvzzPG80qwa-27QXjd820tzcjoUk2Tc6_O=5A@mail.gmail.com>
	<CAPpHfdv2kE8SqT54QChJtieewnpOuF9qvTJ+F_8LPUCEHrM=JQ@mail.gmail.com>
	<CAPpHfdsw9oq62Fvt65JApHJf1auUirdGJV7=nRyVnDL3M8z5xA@mail.gmail.com>
	<ZvY2C8N4ZqgCFaLu@paquier.xyz>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (50+ messages)  latest in thread

Message-ID: <ZvY7M5afmuSgoqUg@paquier.xyz>
Permalink:  ../ZvY7M5afmuSgoqUg@paquier.xyz/
Also on:    postgresql.org/message-id/ZvY7M5afmuSgoqUg@paquier.xyz

 · 

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-committers@postgresql.org
  Cc: michael@paquier.xyz, aekorotkov@gmail.com, peter@eisentraut.org, akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Implement pg_wal_replay_wait() stored procedure
  In-Reply-To: <ZvY7M5afmuSgoqUg@paquier.xyz>

* 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