From: | John H <johnhyvr(at)gmail(dot)com> |
---|---|
To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Allow logical failover slots to wait on synchronous replication |
Date: | 2024-07-18 21:22:08 |
Message-ID: | CA+-JvFvJG=j4BwXecCBx_ZTLML11NiG53_QOtZPMWFC=osdoNg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2024-07-18 21:36:11 | Re: Showing applied extended statistics in explain Part 2 |
Previous Message | John H | 2024-07-18 21:21:59 | Re: Allow logical failover slots to wait on synchronous replication |