Re: lifetime of the old CTID - Mailing list pgsql-general

From Laurenz Albe
Subject Re: lifetime of the old CTID
Date
Msg-id f363b79595205d42764ad7485aa46ab534f2d318.camel@cybertec.at
Whole thread Raw
In response to Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
Responses Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
List pgsql-general
On Tue, 2022-07-05 at 17:52 +0200, Matthias Apitz wrote:
> El día martes, julio 05, 2022 a las 04:17:41p. m. +0200, Laurenz Albe escribió:
> 
> > > > Another explanation could be that the HOT chain was pruned while you were away.
> > > 
> > > I've read now about HOT and understand that autovacuum will prune the
> > > HOT chain. But also a simple SELECT seems to remove it:
> > > 
> > > sisis=# SELECT currtid2('d01buch'::text, '(29036,11)'::tid);
> > >  currtid2  
> > > -----------
> > >  (29036,7)
> > > 
> > > 
> > > sisis=# select ctid, d01gsi from d01buch where d01gsi = '0240564';
> > >    ctid    |           d01gsi            
> > > -----------+-----------------------------
> > >  (29036,7) | 0240564                    
> > > 
> > > 
> > > sisis=# SELECT currtid2('d01buch'::text, '(29036,11)'::tid);
> > >   currtid2  
> > > ------------
> > >  (29036,11)
> > 
> > Right.  Heap-Only tuples can also vanish without autovacuum; that is why I
> > suspected it might have been that.
> 
> Hi Laurenz, ist there any way to keep/freeze such tuples until the run
> of the next autovaccum? Some kind of config value in 13.x or 14.x? Or
> even a code change for this? We compile on Linux from the sources and
> have already some code changes in place...

That should be possible, but why do you want that?  Perhaps there is a better
solution for your problem.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-general by date:

Previous
From: Matthias Apitz
Date:
Subject: Re: lifetime of the old CTID
Next
From: shashidhar Reddy
Date:
Subject: How to upgrade postgres version 8 to 13