public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: shveta malik <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: [email protected]
Subject: Re: Missing LWLock protection in pgstat_reset_replslot()
Date: Tue, 5 Mar 2024 13:22:23 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJpy0uD0L1g2_aZdWYg9T4QKbeewUBOWHFS0ARhbwAck82GrZg@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAJpy0uD0L1g2_aZdWYg9T4QKbeewUBOWHFS0ARhbwAck82GrZg@mail.gmail.com>
Hi,
On Tue, Mar 05, 2024 at 02:19:19PM +0530, shveta malik wrote:
> On Tue, Mar 5, 2024 at 1:25 PM Heikki Linnakangas <[email protected]> wrote:
>
> > SearchNamedReplicationSlot() will also acquire the lock in LW_SHARED
> > mode, when you pass need_lock=true. So that at least should be changed
> > to false.
> >
>
> Also don't we need to release the lock when we return here:
>
> /*
> * Nothing to do for physical slots as we collect stats only for logical
> * slots.
> */
> if (SlotIsPhysical(slot))
> return;
D'oh! Thanks! Fixed in v2 shared up-thread.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Missing LWLock protection in pgstat_reset_replslot()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox