Re: Allow logical failover slots to wait on synchronous replication - Mailing list pgsql-hackers

From John H
Subject Re: Allow logical failover slots to wait on synchronous replication
Date
Msg-id CA+-JvFvJG=j4BwXecCBx_ZTLML11NiG53_QOtZPMWFC=osdoNg@mail.gmail.com
Whole thread Raw
In response to Re: Allow logical failover slots to wait on synchronous replication  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Allow logical failover slots to wait on synchronous replication
List pgsql-hackers
Hi Bertrand,

> 1 ===
> ...
> That's worth additional comments in the code.

There's this comment already about caching the value already, not sure
if you prefer something more?

/* Cache values to reduce contention on lock */

> 2 ===
> ...
> Looks like setting initialized to true is missing once done.

Thanks, will update.

> 3 ===
> ...
> NUM_SYNC_REP_WAIT_MODE is small but as the goal is the keep the lock time as
> short as possible I wonder if it wouldn't be better to use memcpy() here instead
> of this for loop.
>

It results in a "Wdiscarded-qualifiers" which is safe given we take
the lock, but adds noise?
What do you think?

"slot.c:2756:46: warning: passing argument 2 of ‘memcpy’ discards
‘volatile’ qualifier from pointer target type
[-Wdiscarded-qualifiers]"

Thanks,


--
John Hsu - Amazon Web Services



pgsql-hackers by date:

Previous
From: John H
Date:
Subject: Re: Allow logical failover slots to wait on synchronous replication
Next
From: Tomas Vondra
Date:
Subject: Re: Showing applied extended statistics in explain Part 2