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

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: <m(dot)litsarev(at)postgrespro(dot)ru>
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: 2024-04-15 21:06:03
Message-ID: D0L038YNGLYO.D2Q6GHBR7U40@neon.tech
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2024-04-15 21:14:10 Re: make dist using git archive
Previous Message Andres Freund 2024-04-15 20:43:55 Re: Differential code coverage between 16 and HEAD