PATCH: Add 'pid' column to pg_replication_slots

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема PATCH: Add 'pid' column to pg_replication_slots
Дата
Msg-id CAMsr+YFKgZca5_7_ouaMWxA5PneJC9LNViPzpDHusaPhU9pA7g@mail.gmail.com
обсуждение исходный текст
Ответы Re: PATCH: Add 'pid' column to pg_replication_slots  (Andres Freund <andres@anarazel.de>)
Re: PATCH: Add 'pid' column to pg_replication_slots  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
The attached patch adds a 'pid' column to pg_replication_slots, so it's possible to associate an active slot with the pg_stat_replication entry that describes the walsender using the slot.

If a user backend (or bgworker) is using the slot over the SQL interface, the 'pid' column will correspond to the pg_stat_activity entry for that backend instead. After all, both it and pg_stat_replication are views over pg_stat_get_activity() anyway.

Detailed rationale in patch.

Please consider this for 9.5. It's a pretty light patch, and it'd be good to have it in place to ease monitoring of slot-based replication.

Note that logical replication walsenders are broken in HEAD so testing this using the test_decoding module and pg_recvlogical will crash the walsender. This is a pre-existing bug; see http://www.postgresql.org/message-id/CAB7nPqQSdx7coHk0D6G=mkJntGYjXPDw+PWisKKSsAeZFTskvg@mail.gmail.com and  http://www.postgresql.org/message-id/CAMsr+YEh50r70+hP+w=rCzEuenoQRCNMDA7PmRSK06Ro9r=9sA@mail.gmail.com)

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
Вложения

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

Предыдущее
От: Sawada Masahiko
Дата:
Сообщение: Re: Proposal : REINDEX xxx VERBOSE
Следующее
От: Craig Ringer
Дата:
Сообщение: Row security violation error is misleading