Re: Cleaning up nbtree after logical decoding on standby work

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Subject: Re: Cleaning up nbtree after logical decoding on standby work
Date: 2023-06-10 21:10:26
Message-ID: CAH2-WzkvU2siPNBtQXRANHAS54Er3JvKDoXvV6HKppTumYLEJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 9, 2023 at 12:23 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > I'm not sure there is that concensus (for me half the changes shouldn't be
> > done, the rest should be in 17), but in the end it doesn't matter that much.

I pushed this just now. I have also closed out the open item.

> > > --- a/src/include/utils/tuplesort.h
> > > +++ b/src/include/utils/tuplesort.h
> > > @@ -399,9 +399,7 @@ extern Tuplesortstate *tuplesort_begin_heap(TupleDesc tupDesc,
> > > int workMem, SortCoordinate coordinate,
> > > int sortopt);
> > > extern Tuplesortstate *tuplesort_begin_cluster(TupleDesc tupDesc,
> > > - Relation indexRel,
> > > - Relation heaprel,
> > > - int workMem,
> > > + Relation indexRel, int workMem,
> > > SortCoordinate coordinate,
> > > int sortopt);
> >
> > I think we should continue to provide the table here, even if we don't need it
> > today.
>
> I don't see why, but okay. I'll do it that way.

I didn't end up doing that in the version that I pushed (heaprel was
removed from tuplesort_begin_cluster in the final version after all),
since I couldn't justify the use of NewHeap over OldHeap at the call
site in heapam_handler.c. If you're interested in following up with
this yourself, I have no objections.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-06-10 21:10:59 Re: index prefetching
Previous Message Tom Lane 2023-06-10 21:00:55 Re: abi-compliance-checker