Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers
邱宇航 <iamqyh@gmail.com>
From: 邱宇航 <iamqyh@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-11-03T02:15:09Z
Lists: pgsql-hackers
Attachments
- 0001-Add-CHECK_FOR_INTERRUPTS-in-Evict-Rel-All-UnpinnedBu.patch (application/octet-stream) patch 0001
- (unnamed) (text/plain)
The pg_buffercache_evict_{relation,all} operations can become extremely
slow when dealing with large buffer pools containing many dirty buffers.
This commit adds CHECK_FOR_INTERRUPTS calls within the underlying
Evict{Rel,All}UnpinnedBuffers functions to ensure these operations
cancellable.
And this should be backpatched through v18 where
pg_buffercache_evict_{relation,all} operations are introduced.
Commits
-
Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.
- 8ae0f6a0c3da 19 (unreleased) landed
- 71aa2e1147b9 18.1 landed
-
Add CHECK_FOR_INTERRUPTS in contrib/pg_buffercache functions.
- eab9e4e27c0c 19 (unreleased) cited