Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers

From: 邱宇航 <iamqyh(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers
Date: 2025-11-03 02:15:09
Message-ID: 8DC280D4-94A2-4E7B-BAB9-C345891D0B78@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Attachment Content-Type Size
0001-Add-CHECK_FOR_INTERRUPTS-in-Evict-Rel-All-UnpinnedBu.patch application/octet-stream 1.4 KB
unknown_filename text/plain 2 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-11-03 02:20:28 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Thomas Munro 2025-11-03 02:09:43 Re: meson's in-tree libpq header search order vs -Dextra_include_dirs