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

2024-06-13 Thread m . litsarev
Hi! Michael, I have fixed the patches according to your comments. merge both local variables into a single bits32 store? This is done in v3-0001-Standby-mode-requested.patch Then this could be used with a function that returns a text[] array with all the states retrieved? Placed this in

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

2024-05-06 Thread m . litsarev
simple there are already too many of them. Perhaps we should begin tracking all that as a set of bitmasks, then plug in the tracked state in shmem for consumption in some SQL function. Hi! Michael, Tristan as a first step I have introduced the `SharedRecoveryDataFlags` bitmask instead of

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

2024-04-17 Thread m . litsarev
On 2024-Apr-16, Michael Paquier wrote: there are already too many of them. Perhaps we should begin tracking all that as a set of bitmasks, then plug in the tracked state in shmem for consumption in some SQL function. Yes, it sounds reasonable. Let me implement some initial draft and come

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

2024-03-26 Thread m . litsarev
Hi, At present time, an existing pg_is_in_recovery() method is not enough to distinguish a server being in point in time recovery (PITR) mode and an ordinary replica because it returns true in both cases. That is why pg_is_standby_requested() function introduced in attached patch might help.