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

From Tristan Partin
Subject Re: SQL function which allows to distinguish a server being in point in time recovery mode and an ordinary replica
Date
Msg-id D0L038YNGLYO.D2Q6GHBR7U40@neon.tech
Whole thread Raw
Responses Re: SQL function which allows to distinguish a server being in point in time recovery mode and an ordinary replica
List pgsql-hackers
On Tue Mar 26, 2024 at 9:28 AM CDT, m.litsarev wrote:
> 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.
> It reports whether a standby.signal file was found in the data directory
> at startup process.
> Instructions for reproducing the possible use case are also attached.
>
> Hope it will be usefull.

Hey Mikhail,

Saw your patch for the first time today. Looks like your patch is messed
up? You seem to have more of the diff at the bottom which seems to add
a test. Want to send a v2 with a properly formatted patch?

Example command:

git format-patch -v2 -M HEAD^

--
Tristan Partin
Neon (https://neon.tech)



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Differential code coverage between 16 and HEAD
Next
From: "Tristan Partin"
Date:
Subject: Re: make dist using git archive