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 1o8lGu-00072M-Eg for pgsql-general@arkaria.postgresql.org; Tue, 05 Jul 2022 16:19:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8lGs-0000mw-EK for pgsql-general@arkaria.postgresql.org; Tue, 05 Jul 2022 16:19:30 +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 1o8lGs-0000ml-0K for pgsql-general@lists.postgresql.org; Tue, 05 Jul 2022 16:19:30 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o8lGj-0004r7-J3 for pgsql-general@lists.postgresql.org; Tue, 05 Jul 2022 16:19:28 +0000 Received: by mail-ed1-x530.google.com with SMTP id g1so8311434edb.12 for ; Tue, 05 Jul 2022 09:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=nEj+kpju3kQFZRbIyPpBXTVn71v4E+4HBM6ywx0D4A0=; b=BySoaKycpbONYOtsNE/BBNFEKvd8vgN7Cm3Cv5JpxQ6n3ZAWXxs3iXZ1Uu0kF8xHPQ 8sF8rsW66gcONGw+DyOY8F1eV8TwwKtdid85xC6bU62neJOekRz1ROtMvoCzLfQzM2ES ep0MWWYDJpIl8REmOgj0iBShGhJA9+UwCIGpNl4d5fcCTn9VdIQdJLAcHzWaeVSCMfT5 guHwVhRBYT4i3UcFSwZVxDa+MvocBTMy/7GpIlI9z0YlzTdSA+Jwpey1QEOlKgMmW9Uq 8L9gdsJ8HHH/QeMlmkFC0MiEupvlJlENJ4C0NzRLHnn62Apiug2tAGRZw/kN3PkEOVfW ezYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=nEj+kpju3kQFZRbIyPpBXTVn71v4E+4HBM6ywx0D4A0=; b=BTF95WLSCBdE7a1FrA1GQ/w/135w8hAawX6AyEnCxd7evkQQv0c42v1rHJie1RYrtl 1kAYvElUPIRlNRw/naARuUIs4Z/V1Qk13UiAcbouvvs48V4HgjqFcI33KRwkb0CGBSY1 xVv66SunYaTvJUoUp0/en2mYCxQWgkE1EjnbGv4h3PlxFgdHIxBssvPpWvTytfFpOvSr PplQRqaaNAqObk4kSgkFg9pnc097v+8wf2rJv6Nhnixbiexw2Ce4nOUlPexYMhsD3JX6 n+v5Lur6B7jnDvuVk5Q61t/3L/tXUzejY50fNv3m/jlQRWauAWQquzJnc4SYoyum6a9i miFQ== X-Gm-Message-State: AJIora+dLl1XP7CV4fhN8DYiKicVGCACrEGiy6IDjydziBNPq+rW0wPt rxtT41N5ZpNoBsSL1TBJCOH2Yd/CsQDL9Q== X-Google-Smtp-Source: AGRyM1syZOeIUsWCtpb9q4mlh5ZR/p2MLK1YDS5kqpvJp5k5k/De2g9AxcLTPLrFgNgfMUMTc97B9A== X-Received: by 2002:a05:6402:90a:b0:439:c144:24cd with SMTP id g10-20020a056402090a00b00439c14424cdmr24462004edz.209.1657037959815; Tue, 05 Jul 2022 09:19:19 -0700 (PDT) Received: from localhost.localdomain (178-190-172-32.adsl.highway.telekom.at. [178.190.172.32]) by smtp.gmail.com with ESMTPSA id c20-20020a056402101400b004358cec9ce1sm23414871edu.65.2022.07.05.09.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 09:19:18 -0700 (PDT) Message-ID: Subject: Re: lifetime of the old CTID From: Laurenz Albe To: Matthias Apitz Cc: pgsql-general@lists.postgresql.org Date: Tue, 05 Jul 2022 18:19:18 +0200 In-Reply-To: References: <20220705075119.GA23@sh4-5.1blu.de> <03ca00a881de408016a907e31d832175b04aeac7.camel@cybertec.at> <20220705102201.GA9@sh4-5.1blu.de> <1c03b94b606f493bc6448b8559c4cccf806d3607.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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