Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Alexander Korotkov
On Mon, Nov 4, 2024 at 5:57 PM Heikki Linnakangas wrote: > On 04/11/2024 17:53, Robert Haas wrote: > > On Mon, Nov 4, 2024 at 9:19 AM Alvaro Herrera > > wrote: > >> It's looking to me like there's just too much cruft in the quest to > >> avoid having to reach consensus on new syntax. This might

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Alexander Korotkov
On Mon, Nov 4, 2024 at 8:04 AM Michael Paquier wrote: > On Mon, Nov 04, 2024 at 06:29:42AM +0200, Alexander Korotkov wrote: > > The attached patchset contains patch 0001, which improves handling of > > not in recovery state by usage of PromoteIsTriggered(). When > > (PromoteIsTriggered() == false

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Alexander Korotkov
On Mon, Nov 4, 2024 at 4:19 PM Alvaro Herrera wrote: > On 2024-Nov-04, Alexander Korotkov wrote: > > > On Mon, Nov 4, 2024 at 8:04 AM Michael Paquier wrote: > > > > Using output parameters in a procedure is something I did not recall. > > > Based on your point about not using a function due your

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Heikki Linnakangas
On 04/11/2024 18:53, Robert Haas wrote: On Mon, Nov 4, 2024 at 10:57 AM Heikki Linnakangas wrote: Maybe that's just a better fit and we don't need either a procedure or new syntax. I think it would still be good to expose the feature at SQL level too. Makes it easier to test and makes it usabl

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Robert Haas
On Mon, Nov 4, 2024 at 10:57 AM Heikki Linnakangas wrote: > > There's also the patch that Heikki posted to wait using a > > protocol-level facility. > > It was Peter E Oops. > > Maybe that's just a better fit and we don't need either a procedure > > or new syntax. > I think it would still be goo

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Heikki Linnakangas
On 04/11/2024 17:53, Robert Haas wrote: On Mon, Nov 4, 2024 at 9:19 AM Alvaro Herrera wrote: It's looking to me like there's just too much cruft in the quest to avoid having to reach consensus on new syntax. This might be a mistake. Is it possible to backtrack on that decision? There's als

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Robert Haas
On Mon, Nov 4, 2024 at 9:19 AM Alvaro Herrera wrote: > It's looking to me like there's just too much cruft in the quest to > avoid having to reach consensus on new syntax. This might be a mistake. > Is it possible to backtrack on that decision? There's also the patch that Heikki posted to wait u

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Alvaro Herrera
On 2024-Nov-04, Alexander Korotkov wrote: > On Mon, Nov 4, 2024 at 8:04 AM Michael Paquier wrote: > > Using output parameters in a procedure is something I did not recall. > > Based on your point about not using a function due your argument based > > on the snapshots, let's just use that and for

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Alexander Korotkov
On Mon, Nov 4, 2024 at 8:04 AM Michael Paquier wrote: > > On Mon, Nov 04, 2024 at 06:29:42AM +0200, Alexander Korotkov wrote: > > The attached patchset contains patch 0001, which improves handling of > > not in recovery state by usage of PromoteIsTriggered(). When > > (PromoteIsTriggered() == fal

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-03 Thread Michael Paquier
On Mon, Nov 04, 2024 at 06:29:42AM +0200, Alexander Korotkov wrote: > The attached patchset contains patch 0001, which improves handling of > not in recovery state by usage of PromoteIsTriggered(). When > (PromoteIsTriggered() == false), last replay LSN is not accepted and > not reported in errdet

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-03 Thread Alexander Korotkov
On Sun, Nov 3, 2024 at 11:03 PM Alexander Korotkov wrote: > On Sun, Nov 3, 2024 at 10:54 PM Alexander Korotkov > wrote: > > > > On Mon, Oct 28, 2024 at 9:42 PM Alexander Korotkov > > wrote: > > > > > > On Mon, Oct 28, 2024 at 11:36 AM Heikki Linnakangas > > > wrote: > > > > > > > > On 25/10/

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-03 Thread Alexander Korotkov
On Sun, Nov 3, 2024 at 10:54 PM Alexander Korotkov wrote: > > On Mon, Oct 28, 2024 at 9:42 PM Alexander Korotkov > wrote: > > > > On Mon, Oct 28, 2024 at 11:36 AM Heikki Linnakangas wrote: > > > > > > On 25/10/2024 14:56, Alexander Korotkov wrote: > > > > I see that pg_wal_replay_wait_status()

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-03 Thread Alexander Korotkov
Hi, Heikki! On Mon, Oct 28, 2024 at 9:42 PM Alexander Korotkov wrote: > > On Mon, Oct 28, 2024 at 11:36 AM Heikki Linnakangas wrote: > > > > On 25/10/2024 14:56, Alexander Korotkov wrote: > > > I see that pg_wal_replay_wait_status() might look weird, but it seems > > > to me like the best of fea

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-10-28 Thread Alexander Korotkov
On Mon, Oct 28, 2024 at 11:36 AM Heikki Linnakangas wrote: > > On 25/10/2024 14:56, Alexander Korotkov wrote: > > I see that pg_wal_replay_wait_status() might look weird, but it seems > > to me like the best of feasible solutions. > > I haven't written many procedures, but our docs say: > > > Pro