pgsql: Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable.
pgsql: Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable.
От:
Nathan Bossart <nathan@postgresql.org>
Дата:
Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable. Currently, this variable is a Buffer that is accessed via a volatile pointer. By converting it to an atomic variable, we can remove the volatile qualifiers. No barriers are needed because the value is published before the backends that read it are signaled. Reviewed-by: Peter Eisentraut Reviewed-by: Andres Freund Reviewed-by: Zsolt Parragi Tested-by: solai v Discussion: https://postgr.es/m/alAJeRRzehDjLaF1%40nathan Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cb4a03db9ed7606da1c36e4214a6c5fd6437a26c Modified Files -------------- src/backend/storage/lmgr/proc.c | 12 +++--------- src/include/storage/proc.h | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-)