Re: SQL function which allows to distinguish a server being in point in time recovery mode and an ordinary replica

From: m(dot)litsarev(at)postgrespro(dot)ru
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: SQL function which allows to distinguish a server being in point in time recovery mode and an ordinary replica
Date: 2025-01-10 20:39:07
Message-ID: 1a0ceb98059fcb0994c47ba44cd6f2a1@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Michael, sorry for such a long time to deliver next version of the patch
from my side.
In this version I have fixed all your propositions, hopefully correct.

There is one point that I would like to emphasize, namely
> Shouldn't STANDBY_MODE be only used in the local flag, as well as an
> ARCHIVE_RECOVERY_REQUESTED? It looks like this could push a bit more
> forward the removal of more of these booleans, with a bit more work..
I made corresponding changes, but given that these three variables
bool ArchiveRecoveryRequested;
bool InArchiveRecovery;
bool StandbyMode;
are used in other units, and (if I understand correctly) we decided to
move them in one localRecoveryFlags bitset too,
I changed their extern calls to boolean functions calls instead of
extern variables.

> The test additions are welcome.
My test additions were based on copy of StandbyModeRequested placed in
shared memory
even the startup process is done. With current implementation they seems
to be not very usefull now.

Respectfully,

Mikhail Litsarev,
Postgres Professional: https://postgrespro.com

Attachment Content-Type Size
v4-0001-Standby-mode-requested.patch text/x-diff 31.7 KB
v4-0002-Text-array-sql-wrapper.patch text/x-diff 3.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-01-10 20:46:45 Re: [PATCH] Hex-coding optimizations using SVE on ARM.
Previous Message Tom Lane 2025-01-10 20:19:05 Re: IANA timezone abbreviations versus timezone_abbreviations