Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-07-01 Thread Masahiko Sawada
On Wed, Jul 2, 2025 at 3:34 AM Melanie Plageman wrote: > > On Tue, Jul 1, 2025 at 12:01 AM Masahiko Sawada wrote: > > > > I've attached the updated patches for master and backbranches (v17 and > > v18). Please review these patches. > > All look good to me. One nitpick that is up to you if you wan

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-07-01 Thread Melanie Plageman
On Tue, Jul 1, 2025 at 12:01 AM Masahiko Sawada wrote: > > I've attached the updated patches for master and backbranches (v17 and > v18). Please review these patches. All look good to me. One nitpick that is up to you if you want to change: the comment * Return the number of tuples deleted from

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-30 Thread Masahiko Sawada
On Mon, Jun 30, 2025 at 10:20 PM Melanie Plageman wrote: > > On Tue, Jun 24, 2025 at 6:59 PM Melanie Plageman > wrote: > > > > So, I think we should commit the fix you proposed. I agree with your analysis. > > > > The only question I have left is implementation: should we have > > ndeleted as a

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-30 Thread Masahiko Sawada
On Mon, Jun 30, 2025 at 10:20 PM Melanie Plageman wrote: > > On Tue, Jun 24, 2025 at 6:59 PM Melanie Plageman > wrote: > > > > So, I think we should commit the fix you proposed. > > > > The only question I have left is implementation: should we have > > ndeleted as an output parameter of lazy_sca

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-30 Thread Melanie Plageman
On Tue, Jun 24, 2025 at 6:59 PM Melanie Plageman wrote: > > So, I think we should commit the fix you proposed. > > The only question I have left is implementation: should we have > ndeleted as an output parameter of lazy_scan_prune() or have > lazy_scan_prune() return it (instead of void)? > > In

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-24 Thread Melanie Plageman
On Mon, Jun 9, 2025 at 6:22 PM Melanie Plageman wrote: > > Reviewing your patch, I think there might be an issue still. You > replaced has_lpdead_items with ndeleted. While ndeleted will count > those items we set LP_UNUSED (which is what we want), it also counts > LP_NORMAL items that vacuum sets

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-09 Thread Melanie Plageman
On Mon, Jun 2, 2025 at 8:15 PM Masahiko Sawada wrote: > > I think that this issue presents since commit c120550edb86 but this > commit optimized the vacuum work for tables with no indexes and wasn't > intended to change the FSM vacuum behavior for such tables. Therefore, > I think we can fix the F

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-02 Thread Masahiko Sawada
On Mon, Apr 7, 2025 at 11:52 AM Masahiko Sawada wrote: > > On Mon, Apr 7, 2025 at 8:30 AM Melanie Plageman > wrote: > > > > On Fri, Apr 4, 2025 at 6:07 PM Masahiko Sawada > > wrote: > > > > > > I'm going to push this fix up to HEAD and v17 early next week, unless > > > there is no objection. >

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-04-07 Thread Masahiko Sawada
On Mon, Apr 7, 2025 at 8:30 AM Melanie Plageman wrote: > > On Fri, Apr 4, 2025 at 6:07 PM Masahiko Sawada wrote: > > > > I'm going to push this fix up to HEAD and v17 early next week, unless > > there is no objection. > > I started studying this again looking back at the thread associated > with

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-04-07 Thread Melanie Plageman
On Fri, Apr 4, 2025 at 6:07 PM Masahiko Sawada wrote: > > I'm going to push this fix up to HEAD and v17 early next week, unless > there is no objection. I started studying this again looking back at the thread associated with commit c120550edb86. There was actually a long discussion about how thi

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-04-04 Thread Masahiko Sawada
On Mon, Mar 31, 2025 at 3:29 PM Masahiko Sawada wrote: > > On Mon, Mar 31, 2025 at 3:12 PM Melanie Plageman > wrote: > > > > On Mon, Mar 31, 2025 at 6:03 PM Masahiko Sawada > > wrote: > > > > > > With commit c120550edb86, If we got the cleanup lock on the page, > > > lazy_scan_prune() marks dea

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-03-31 Thread Masahiko Sawada
On Mon, Mar 31, 2025 at 3:12 PM Melanie Plageman wrote: > > On Mon, Mar 31, 2025 at 6:03 PM Masahiko Sawada wrote: > > > > With commit c120550edb86, If we got the cleanup lock on the page, > > lazy_scan_prune() marks dead item IDs directly to LP_UNUSED. So the > > following check with has_lpdead_

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-03-31 Thread Melanie Plageman
On Mon, Mar 31, 2025 at 6:03 PM Masahiko Sawada wrote: > > With commit c120550edb86, If we got the cleanup lock on the page, > lazy_scan_prune() marks dead item IDs directly to LP_UNUSED. So the > following check with has_lpdead_items made the periodic FSM vacuum in > the one-pass strategy vacuum