how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11? - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?
Date
Msg-id CALj2ACXjoR09BaDGu-WGFJxj2LG1KtnADRxpMqMLASPX8ovtLg@mail.gmail.com
Whole thread Raw
Responses Re: how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?  ("Euler Taveira" <euler@eulerto.com>)
Re: how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hi,

I'm trying to set up a postgres server with version 11 in targeted
recovery mode (for the first time after my journey started with
postgres) and I came across the explanation at [1] in PG 12 and newer
versions that we have a clear differentiation as to what is the
"standby" mode or "targeted recovery" mode. How do we differentiate
these two modes in PG 11? Can anyone please help me with it?

PS: hackers-list may not be the right place to ask, but I'm used to
seeking help from it.

[1] From the https://www.postgresql.org/docs/12/runtime-config-wal.html:

"19.5.4. Archive Recovery

This section describes the settings that apply only for the duration
of the recovery. They must be reset for any subsequent recovery you
wish to perform.

“Recovery” covers using the server as a standby or for executing a
targeted recovery. Typically, standby mode would be used to provide
high availability and/or read scalability, whereas a targeted recovery
is used to recover from data loss.

To start the server in standby mode, create a file called
standby.signal in the data directory. The server will enter recovery
and will not stop recovery when the end of archived WAL is reached,
but will keep trying to continue recovery by connecting to the sending
server as specified by the primary_conninfo setting and/or by fetching
new WAL segments using restore_command. For this mode, the parameters
from this section and Section 19.6.3 are of interest. Parameters from
Section 19.5.5 will also be applied but are typically not useful in
this mode.

To start the server in targeted recovery mode, create a file called
recovery.signal in the data directory. If both standby.signal and
recovery.signal files are created, standby mode takes precedence.
Targeted recovery mode ends when the archived WAL is fully replayed,
or when recovery_target is reached. In this mode, the parameters from
both this section and Section 19.5.5 will be used."

Regards,
Bharath Rupireddy.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: .ready and .done files considered harmful
Next
From: Robert Haas
Date:
Subject: Re: extensible options syntax for replication parser?