Add 'active_in' column to pg_replication_slots.
Andres Freund <andres@anarazel.de>
Add 'active_in' column to pg_replication_slots. Right now it is visible whether a replication slot is active in any session, but not in which. Adding the active_in column, containing the pid of the backend having acquired the slot, makes it much easier to associate pg_replication_slots entries with the corresponding pg_stat_replication/pg_stat_activity row. This should have been done from the start, but I (Andres) dropped the ball there somehow. Author: Craig Ringer, revised by me Discussion: CAMsr+YFKgZca5_7_ouaMWxA5PneJC9LNViPzpDHusaPhU9pA7g@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/test_decoding/expected/ddl.out | modified | +2 −2 |
| doc/src/sgml/catalogs.sgml | modified | +10 −0 |
| doc/src/sgml/logicaldecoding.sgml | modified | +4 −4 |
| src/backend/catalog/system_views.sql | modified | +1 −0 |
| src/backend/replication/slot.c | modified | +16 −14 |
| src/backend/replication/slotfuncs.c | modified | +9 −4 |
| src/include/catalog/pg_proc.h | modified | +1 −1 |
| src/include/replication/slot.h | modified | +2 −2 |
| src/test/regress/expected/rules.out | modified | +2 −1 |