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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Floris Van Nee <florisvannee(at)optiver(dot)com>
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 06:23:21
Message-ID: ZmAEWcFYIhnHMs7C@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jun 04, 2024 at 02:25:23PM +0900, Michael Paquier wrote:
>> This does mean it's unfortunately unrelated to the issue I reported
>> here
>> https://www.postgresql.org/message-id/flat/20240505223546.6yvjzgqifuoiii3e%40awork3.anarazel.de#1dfe3ecf6a75ace833444bdc0d268f4a
>> , because the issue in the current thread is fixed by changing a
>> replication-slot call (which is not used in the database for which I
>> reported it).
>
> Yeah, It's clear that we don't have enough information to proceed
> here. It seems to me that there is a good argument for addressing
> this one first, separately of the other one.

I have been playing with this patch and scenarios of replslot
create/drop similar to what's been sent at the top of this thread, and
the solution proposed is proving to be stable enough to not see a
problem in the pgstats machinery after letting the test run 30 minutes
or so (switched sleep intervals for one).

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

I'm kind of feeling that this is not the end of it, even if the use of
the drop routine is inconsistent in this code path. Perhaps that's
just my spidey sense being incorrect here..
--
Michael

Attachment Content-Type Size
v2-0001-Notify-stats-gc-when-dropping-logical-replication.patch text/x-diff 2.1 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2024-06-05 06:33:02 Re: Minor update on pg_hba documentation
Previous Message Thomas Munro 2024-06-05 06:20:26 Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607