Re: Spurious pgstat_drop_replslot() call

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Spurious pgstat_drop_replslot() call
Date: 2024-03-12 05:36:58
Message-ID: Ze_p-hmD_yFeVYXg@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 11, 2024 at 04:15:40PM +0900, Michael Paquier wrote:
> That's a slight change in behavior, unfortunately, and it cannot be
> called a bug as this improves the visibility of the stats after an
> invalidation, so this is not something that can be backpatched.

I've looked again at that and that was OK on a second look. May I
suggest the attached additions with LWLockHeldByMeInMode to make sure
that the stats are dropped and created while we hold
ReplicationSlotAllocationLock?
--
Michael

Attachment Content-Type Size
slot-stats-asserts.patch text/x-diff 939 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-03-12 05:53:27 Re: UUID v7
Previous Message Amit Kapila 2024-03-12 05:28:01 Re: Regardign RecentFlushPtr in WalSndWaitForWal()