RE: BUG #17947: Combination of replslots pgstat issues causes error/assertion failure

From: Floris Van Nee <florisvannee(at)Optiver(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "exclusion(at)gmail(dot)com" <exclusion(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #17947: Combination of replslots pgstat issues causes error/assertion failure
Date: 2024-06-05 10:24:43
Message-ID: a3de68e3a48c4a55a3f6f64d87486ffd@Optiver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>
> Note an extra edge case in pgstat_init_function_usage(), which should do
> the same, I guess?
>

I noticed it but wasn't sure if it was necessary here due to the exceptional case here.
It raises ereport error right after and can only reach this if the entry was created
In the call to pgstat_prep_pending_entry before it, so it seems unlikely another
backend holds a ref to it. I might be wrong though.

> Attached is an updated patch with refined comments at the top of ?
> pgstat_drop_entry(), to be applied to 15~.

Thanks for testing the patch. Updated patch looks good to me.

-Floris

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Floris Van Nee 2024-06-05 10:31:04 RE: error "can only drop stats once" brings down database
Previous Message Rahul Pandey 2024-06-05 09:10:30 Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607