From 241ba4e3ecda6421196addff37704e84a33d5e62 Mon Sep 17 00:00:00 2001 From: Henrik TJ Date: Tue, 28 Apr 2026 12:40:18 +0200 Subject: [PATCH] Update the paragraph on background writer processing on locking to say share-exlusive, as that should now be used for writing, and remove the note on consistency, as it is no longer relevant. Probably a tiny oversight in 82467f627bd4 --- src/backend/storage/buffer/README | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/storage/buffer/README b/src/backend/storage/buffer/README index b332e002ba1..809aaf8d28b 100644 --- a/src/backend/storage/buffer/README +++ b/src/backend/storage/buffer/README @@ -265,11 +265,9 @@ only needs to take the lock long enough to read the variable value, not while scanning the buffers. (This is a very substantial improvement in the contention cost of the writer compared to PG 8.0.) -The background writer takes shared content lock on a buffer while writing it -out (and anyone else who flushes buffer contents to disk must do so too). -This ensures that the page image transferred to disk is reasonably consistent. -We might miss a hint-bit update or two but that isn't a problem, for the same -reasons mentioned under buffer access rules. +The background writer takes shared-exclusive content lock on a buffer while +writing it out (and anyone else who flushes buffer contents to disk must do +so too). This ensures that the page image transferred to disk is consistent. As of 8.4, background writer starts during recovery mode when there is some form of potentially extended recovery to perform. It performs an -- 2.53.0