Use 64-bit atomics for xlblocks array elements.

Jeff Davis <jdavis@postgresql.org>

Commit: c3a8e2a7cb16d55e3b757934b538cb8b8a0eab02
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2023-12-20T01:35:42Z
Releases: 17.0
Use 64-bit atomics for xlblocks array elements.

In preparation for reading the contents of WAL buffers without a
lock. Also, avoids the previously-needed comment in GetXLogBuffer()
explaining why it's safe from torn reads.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACVfFMfqD5oLzZSQQZWfXiJqd-NdX0_317veP6FuB31QWA@mail.gmail.com
Reviewed-by: Andres Freund

Files

PathChange+/−
src/backend/access/transam/xlog.c modified +19 −21

Discussion