Re: Disabling Heap-Only Tuples - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Disabling Heap-Only Tuples
Date
Msg-id CAFiTN-tni4BXaUKb=Nm0g+yCoC2yrSgC3VEHG5F7BcErDE=cCA@mail.gmail.com
Whole thread Raw
In response to Re: Disabling Heap-Only Tuples  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Responses Re: Disabling Heap-Only Tuples
List pgsql-hackers
On Fri, Jul 7, 2023 at 1:48 AM Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:
>
> On Wed, 5 Jul 2023 at 19:55, Thom Brown <thom@linux.com> wrote:
> >
> > On Wed, 5 Jul 2023 at 18:05, Matthias van de Meent
> > <boekewurm+postgres@gmail.com> wrote:
> > > So what were you thinking of? A session GUC? A table option?
> >
> > Both.
>
> Here's a small patch implementing a new table option max_local_update
> (name very much bikesheddable). Value is -1 (default, disabled) or the
> size of the table in MiB that you still want to allow to update on the
> same page. I didn't yet go for a GUC as I think that has too little
> control on the impact on the system.

So IIUC, this parameter we can control that instead of putting the new
version of the tuple on the same page, it should choose using
RelationGetBufferForTuple(), and that can reduce the fragmentation
because now if there is space then most of the updated tuple will be
inserted in same pages.  But this still can not truncate the pages
from the heap right? because we can not guarantee that the new page
selected by RelationGetBufferForTuple() is not from the end of the
heap, and until we free the pages from the end of the heap, the vacuum
can not truncate any page.  Is my understanding correct?

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Autogenerate some wait events code and documentation
Next
From: Japin Li
Date:
Subject: Add hint message for check_log_destination()