Re: Optimize truncation logic to reduce AccessExclusive lock impact

2025-04-04 Thread Yura Sokolov
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%

Re: Optimize truncation logic to reduce AccessExclusive lock impact

2025-03-21 Thread Yura Sokolov
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.

Re: Optimize truncation logic to reduce AccessExclusive lock impact

2025-03-18 Thread David Rowley
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