19.03.2025 05:09, David Rowley wrote:
> On Tue, 18 Mar 2025 at 19:04, Stepan Neretin wrote:
>> We propose modifying the truncation condition in should_attempt_truncation
>> to avoid unnecessary full buffer scans. The new formula ensures we only
>> attempt truncation when we can free at least 3%
19.03.2025 19:05, Yura Sokolov wrote:
> 19.03.2025 05:09, David Rowley wrote:
>> On Tue, 18 Mar 2025 at 19:04, Stepan Neretin wrote:
>>> We propose modifying the truncation condition in should_attempt_truncation
>>> to avoid unnecessary full buffer scans.
>> I'm just following this code through.
On Tue, 18 Mar 2025 at 19:04, Stepan Neretin wrote:
> We propose modifying the truncation condition in should_attempt_truncation to
> avoid unnecessary full buffer scans. The new formula ensures we only attempt
> truncation when we can free at least 3% of the relation size + 2 pages. This
> cha
Hi hackers,
We've encountered an issue where autovacuum holds an AccessExclusive lock
for an extended period when attempting to truncate heap tables. The root
cause appears to be the way autovacuum handles block truncation,
specifically when scanning shared buffers during smgrtruncate. This issue