summaryrefslogtreecommitdiff
path: root/src/backend/backup/basebackup_incremental.c
diff options
context:
space:
mode:
authorAlvaro Herrera2024-04-05 14:14:39 +0000
committerAlvaro Herrera2024-04-05 14:14:39 +0000
commitee1cbe806dad47674ded35427c6ba217531847d6 (patch)
tree4754aa0dc50ae700e2358d4fc6c3e0860ef71e9f /src/backend/backup/basebackup_incremental.c
parent6f132ed693b6a0be0997f092c42abf14878362ac (diff)
Operate XLogCtl->log{Write,Flush}Result with atomics
This removes the need to hold both the info_lck spinlock and WALWriteLock to update them. We use stock atomic write instead, with WALWriteLock held. Readers can use atomic read, without any locking. This allows for some code to be reordered: some places were a bit contorted to avoid repeated spinlock acquisition, but that's no longer a concern, so we can turn them to more natural coding. Some further changes are possible (maybe to performance wins), but in this commit I did rather minimal ones only, to avoid increasing the blast radius. Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: Jeff Davis <[email protected]> Reviewed-by: Andres Freund <[email protected]> (earlier versions) Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/backup/basebackup_incremental.c')
0 files changed, 0 insertions, 0 deletions