Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases
Дата
Msg-id CAD21AoB71zkP7uPT7JDPsZcvp0749ExEQnOJxeNKPDFisHar+w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases  (Nathan Bossart <nathandbossart@gmail.com>)
RE: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases  (Melih Mutlu <m.melihmutlu@gmail.com>)
Список pgsql-hackers
Hi,

We call pgstat_drop_subscription() at the end of DropSubscription()
but we could leave from this function earlier e.g. when no slot is
associated with the subscription. In this case, the statistics entry
for the subscription remains. To fix it, I think we need to call it
earlier, just after removing the catalog tuple. There is a chance the
transaction dropping the subscription fails due to network error etc
but we don't need to worry about it as reporting the subscription drop
is transactional.

I've attached the patch. Feedback is very welcome.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: SQL:2011 application time
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Add two missing tests in 035_standby_logical_decoding.pl