From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Emit fewer vacuum records by reaping removable tuples during pruning |
Date: | 2024-01-12 20:04:19 |
Message-ID: | CAAKRu_aCYDqz7CyF6nHVbDijLrTCDmO1qucG623-Z6ZjTOQNcQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 12, 2024 at 2:47 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Fri, Jan 12, 2024 at 2:43 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > You're using "!prunestate.has_lpdead_items" as part of your test that
> > sets "recordfreespace". But lazy_scan_noprune doesn't get passed a
> > pointer to prunestate, so clearly you'll need to detect the same
> > condition some other way.
>
> OOPS. Thanks.
Also, I think you should combine these in lazy_scan_noprune() now
/* Save any LP_DEAD items found on the page in dead_items array */
if (vacrel->nindexes == 0)
{
/* Using one-pass strategy (since table has no indexes) */
if (lpdead_items > 0)
{
Since we don't set recordfreespace in the outer if statement anymore
And I noticed you missed a reference to recordfreespace output
parameter in the function comment above lazy_scan_noprune().
- Melanie
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-01-12 20:14:12 | Re: Recovering from detoast-related catcache invalidations |
Previous Message | Peter Geoghegan | 2024-01-12 20:01:59 | Re: Emit fewer vacuum records by reaping removable tuples during pruning |