localbuf: Introduce InvalidateLocalBuffer()
authorAndres Freund <andres@anarazel.de>
Sat, 15 Mar 2025 16:30:07 +0000 (12:30 -0400)
committerAndres Freund <andres@anarazel.de>
Sun, 16 Mar 2025 02:07:48 +0000 (22:07 -0400)
commit0762a151b0e018944694ccac07e521adcdf7a06f
tree8f35d676a1b07189810062a0d990c0da59e1c2e7
parentfa6af9b25e4b449e6e006d9b3434315c0e8e4402
localbuf: Introduce InvalidateLocalBuffer()

Previously, there were three copies of this code, two of them
identical. There's no good reason for that.

This change is nice on its own, but the main motivation is the AIO patchset,
which needs to add extra checks the deduplicated code, which of course is
easier if there is only one version.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/CAAKRu_b9anbWzEs5AAF9WCvcEVmgz-1AkHSQ-CLLy-p7WHzvFw@mail.gmail.com
src/backend/storage/buffer/localbuf.c