Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Melih Mutlu <m.melihmutlu@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-11T08:12:38Z
Lists: pgsql-hackers
On Wed, May 10, 2023 at 8:58 PM Melih Mutlu <m.melihmutlu@gmail.com> wrote:
>
> Hi,
>
> Masahiko Sawada <sawada.mshk@gmail.com>, 8 May 2023 Pzt, 10:24 tarihinde şunu yazdı:
>>
>> I've attached the patch. Feedback is very welcome.
>
>
> Thanks for the patch, nice catch.
> I can confirm that the issue exists on HEAD and gets resolved by this patch. Also it looks like stats are really not affected if transaction fails for some reason, as you explained.
> IMO, the patch will be OK after commit message is added.

Thank you for reviewing the patch. I'll push the patch early next
week, barring any objections.

Regards,

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



Commits

  1. Stabilize subscription stats test.

  2. pgstat: fix subscription stats entry leak.

  3. Create subscription stats entry at CREATE SUBSCRIPTION time

  4. pgstat: drop subscription stats without slot as well, fix comment