Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r45y4-007KSc-Ml for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Nov 2023 21:01:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r45y2-00G04X-NL for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Nov 2023 21:01:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r45y2-00G02F-De for pgsql-hackers@lists.postgresql.org; Fri, 17 Nov 2023 21:01:34 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r45xz-0064NF-V7 for pgsql-hackers@lists.postgresql.org; Fri, 17 Nov 2023 21:01:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=wpfnIp19aVsuL5m+wRrMGEqhxIVgsA2VCpH1sJy6+mM=; b=ohUAB rPAzxbZAV6KryPO8bSyLQCQXjW4n0vxPJWF2KQaNPH+hz5A0ykphF64v6FwdTLA062sXt4kaYUp7b 66T+rggJo5SpjiQl980ivyvk1pFSaFmdgyYtIyQyEvgMCVRQucoXVGuiKbdP5x4V+iRqwuctJeBKN 7HbwlJg/7kz0AUdItpj6L/9TFK4kYdGLxEHGbOHI+UdoqkO7ka89oXFjPbEykXwXWtZEKqvW5Khmi rMO5cnvPtn0q5ruylM+M0AeccB16PtDJdPB+qkbtk3x9arcHEntDcR+JzWzJp9TkDeUlVr6p+KFYX eP76W5EWZK6WS0p6moM8imXItDoDQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1r45xv-00BKmh-1C; Fri, 17 Nov 2023 16:01:27 -0500 Date: Fri, 17 Nov 2023 16:01:27 -0500 From: Bruce Momjian To: Euler Taveira Cc: Kyotaro HORIGUCHI , pgsql-hackers@lists.postgresql.org Subject: Re: Lifetime of commit timestamps Message-ID: References: <20180622.172132.230342845.horiguchi.kyotaro@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="W6wOg4KT+PZcNNqY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --W6wOg4KT+PZcNNqY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 17, 2023 at 03:39:14PM -0300, Euler Taveira wrote: > On Mon, Nov 13, 2023, at 9:47 PM, Bruce Momjian wrote: > > Is this documentation change still relevant? > > > I think so. AFAICS nothing changed. Unless you read the source code, it is not > clear that VACUUM removes the information for frozen tuples. They are decoupled > (but executed in the same routine for convenience), hence, someone can ask why > the pg_xact_commit_timestamp() returns NULL for a transaction that was executed > *after* you enable track_commit_timestamp. The answer is the design used a > existing mechanism to clean up data in order to avoid creating a new one. Okay, I have developed the attached patch based on Horiguchi-san's version. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --W6wOg4KT+PZcNNqY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="txtime.diff" diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 93f068edcf..b311a11b33 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -25978,7 +25978,8 @@ SELECT collation for ('foo' COLLATE "de_DE"); They only provide useful data when the configuration option is enabled, and only for transactions that were committed after it was - enabled. + enabled. The commit timestamps of frozen tuples are removed during + vacuum. --W6wOg4KT+PZcNNqY--