]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.
authorMasahiko Sawada <msawada@postgresql.org>
Tue, 4 Nov 2025 23:47:22 +0000 (15:47 -0800)
committerMasahiko Sawada <msawada@postgresql.org>
Tue, 4 Nov 2025 23:47:22 +0000 (15:47 -0800)
commit71aa2e1147b9ddae8e6e9717953c28075e287ad2
treeaddc14bb44e73c1ebe6044725b801defd86b670c
parent8733f0b54c05239e059e473c46c1800dcd37cd40
Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.

This commit adds CHECK_FOR_INTERRUPTS to the shared buffer iteration
loops in EvictRelUnpinnedBuffers and EvictAllUnpinnedBuffers. These
functions, used by pg_buffercache's pg_buffercache_evict_relation and
pg_buffercache_evict_all, can now be interrupted during long-running
operations.

Backpatch to version 18, where these functions and their corresponding
pg_buffercache functions were introduced.

Author: Yuhang Qiu <iamqyh@gmail.com>
Discussion: https://postgr.es/m/8DC280D4-94A2-4E7B-BAB9-C345891D0B78%40gmail.com
Backpatch-through: 18
src/backend/storage/buffer/bufmgr.c