Re: Opportunistically pruning page before update

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: Opportunistically pruning page before update
Date: 2023-10-06 05:18:16
Message-ID: CAFiTN-ufsS_Tj=Cg=dvdNojmu2b+G1gvYdax+Q7UmFmqAM2eBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 5, 2023 at 2:35 AM James Coleman <jtc331(at)gmail(dot)com> wrote:
>
> I talked to Andres and Peter again today, and out of that conversation
> I have some observations and ideas for future improvements.
>
> 1. The most trivial case where this is useful is INSERT: we have a
> target page, and it may have dead tuples, so trying to prune may
> result in us being able to use the target page rather than getting a
> new page.
> 2. The next most trivial case is where UPDATE (potentially after
> failing to find space for a HOT tuple on the source tuple's page);
> much like the INSERT case our backend's target page may benefit from
> pruning.

By looking at the patch I believe that v2-0003 is implementing these 2
ideas. So my question is are we planning to prune the backend's
current target page only or if we can not find space in that then we
are targetting to prune the other target pages as well which we are
getting from FSM? Because in the patch you have put a check in a loop
it will try to prune every page it gets from the FSM not just the
current target page of the backend. Just wanted to understand if this
is intentional.

In general, all 4 ideas look promising.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-10-06 05:24:04 Re: Synchronizing slots from primary to standby
Previous Message Tom Lane 2023-10-06 03:11:20 Re: pg_get_indexdef() modification to use TxnSnapshot