bufmgr: Introduce FlushUnlockedBuffer

Andres Freund <andres@anarazel.de>

Commit: 3c2b97b29ee33d5619779fd10e06eee07d4700da
Author: Andres Freund <andres@anarazel.de>
Date: 2025-10-08T18:34:30Z
bufmgr: Introduce FlushUnlockedBuffer

There were several copies of code locking a buffer, flushing its contents, and
unlocking the buffer. It seems worth centralizing that into a helper function.

Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Discussion: https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff

Files

PathChange+/−
src/backend/storage/buffer/bufmgr.c modified +20 −16

Discussion