Re: pg_replslotdata - a tool for displaying replication slot information

Поиск
Список
Период
Сортировка
От Bossart, Nathan
Тема Re: pg_replslotdata - a tool for displaying replication slot information
Дата
Msg-id BF192F9E-28D5-4544-BCB5-DB8612A8C8CF@amazon.com
обсуждение исходный текст
Ответ на Re: pg_replslotdata - a tool for displaying replication slot information  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: pg_replslotdata - a tool for displaying replication slot information  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: pg_replslotdata - a tool for displaying replication slot information  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 11/30/21, 6:14 AM, "Peter Eisentraut" <peter.eisentraut@enterprisedb.com> wrote:
> On 23.11.21 06:09, Bharath Rupireddy wrote:
>> The replication slots data is stored in binary format on the disk under
>> the pg_replslot/<<slot_name>> directory which isn't human readable. If
>> the server is crashed/down (for whatever reasons) and unable to come up,
>> currently there's no way for the user/admin/developer to know what were
>> all the replication slots available at the time of server crash/down to
>> figure out what's the restart lsn, xid, two phase info or types of slots
>> etc.
>
> What do you need that for?  You can't do anything with a replication
> slot while the server is down.

One use-case might be to discover the value you need to set for
max_replication_slots, although it's pretty trivial to discover the
number of replication slots by looking at the folder directly.
However, you also need to know how many replication origins there are,
and AFAIK there isn't an easy way to read the replorigin_checkpoint
file at the moment.  IMO a utility like this should also show details
for the replication origins.  I don't have any other compelling use-
cases at the moment, but I will say that it is typically nice from an
administrative standpoint to be able to inspect things like this
without logging into a running server.

Nathan


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: Support for NSS as a libpq TLS backend