Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8kqX-0005vE-0a for pgsql-general@arkaria.postgresql.org; Tue, 05 Jul 2022 15:52:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8kqV-0007Xl-3v for pgsql-general@arkaria.postgresql.org; Tue, 05 Jul 2022 15:52:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8kqU-0007X9-Pu for pgsql-general@lists.postgresql.org; Tue, 05 Jul 2022 15:52:14 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8kqN-0004eW-Vj for pgsql-general@lists.postgresql.org; Tue, 05 Jul 2022 15:52:14 +0000 Received: from [188.174.54.67] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8kqM-0002vC-6z; Tue, 05 Jul 2022 17:52:06 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.16.1/8.14.9) with ESMTPS id 265Fq57f014147 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 5 Jul 2022 17:52:05 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.16.1/8.14.9/Submit) id 265Fq4UO014146; Tue, 5 Jul 2022 17:52:04 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Tue, 5 Jul 2022 17:52:04 +0200 From: Matthias Apitz To: Laurenz Albe Cc: pgsql-general@lists.postgresql.org Subject: Re: lifetime of the old CTID Message-ID: Reply-To: Matthias Apitz References: <20220705075119.GA23@sh4-5.1blu.de> <03ca00a881de408016a907e31d832175b04aeac7.camel@cybertec.at> <20220705102201.GA9@sh4-5.1blu.de> <1c03b94b606f493bc6448b8559c4cccf806d3607.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1c03b94b606f493bc6448b8559c4cccf806d3607.camel@cybertec.at> X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.54.67 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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... Thanks matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub