pgsql: pgstat: fix subscription stats entry leak.

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема pgsql: pgstat: fix subscription stats entry leak.
Дата
Msg-id E1qGvTC-001z2d-1O@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
pgstat: fix subscription stats entry leak.

Commit 7b64e4b3 taught DropSubscription() to drop stats entry of
subscription that is not associated with a replication slot for apply
worker at DROP SUBSCRIPTION but missed covering the case where the
subscription is not associated with replication slots for both apply
worker and tablesync worker.

Also add a test to verify that the stats for slot-less subscription is
removed at DROP SUBSCRIPTION time.

Backpatch down to 15.

Author: Masahiko Sawada
Reviewed-by: Nathan Bossart, Hayato Kuroda, Melih Mutlu, Amit Kapila
Discussion: https://postgr.es/m/CAD21AoB71zkP7uPT7JDPsZcvp0749ExEQnOJxeNKPDFisHar+w@mail.gmail.com
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/be8cae7e2f03f35a049e2b1f1113860fea6d0212

Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 12 ++++++------
src/test/subscription/t/026_stats.pl    | 20 ++++++++++++++++++++
2 files changed, 26 insertions(+), 6 deletions(-)


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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: pgsql: pgstat: fix subscription stats entry leak.
Следующее
От: Masahiko Sawada
Дата:
Сообщение: pgsql: pgstat: fix subscription stats entry leak.