Re: how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?
Дата
Msg-id 5b9509fb-e07b-4e99-97fe-8d1a5f24e4f6@www.fastmail.com
обсуждение исходный текст
Ответ на how to distinguish between using the server as a standby or for executing a targeted recovery in PG 11?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Fri, Sep 24, 2021, at 1:46 PM, Bharath Rupireddy wrote:
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?
It seems you have to rely on parsing recovery.conf. However, someone can modify
it after starting Postgres. In this case, you have to use a debugger such as

gdb /path/to/postgres -p $(pgrep -f 'postgres: startup recovering') -quiet -batch -ex 'p StandbyMode' -ex 'quit'

Unfortunately, there is no simple way such as checking if a .signal file exists.


--
Euler Taveira

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: storing an explicit nonce
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: typos (and more)