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 1ric99-000apw-NW for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Mar 2024 15:28:32 +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 1ric98-00DSPo-3w for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Mar 2024 15:28:30 +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 1ric97-00DSPg-S8 for pgsql-bugs@lists.postgresql.org; Fri, 08 Mar 2024 15:28:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ric94-003UvT-KY for pgsql-bugs@lists.postgresql.org; Fri, 08 Mar 2024 15:28:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 428FSQUx794155; Fri, 8 Mar 2024 10:28:26 -0500 From: Tom Lane To: junhkang91@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18384: It's not bug just question about documentation In-reply-to: <18384-d9f97269de73f0fa@postgresql.org> References: <18384-d9f97269de73f0fa@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 08 Mar 2024 06:00:16 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <794153.1709911706.1@sss.pgh.pa.us> Date: Fri, 08 Mar 2024 10:28:26 -0500 Message-ID: <794154.1709911706@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > "The internal transaction ID type xid is 32 bits wide and wraps around every > 4 billion transactions." > "it is necessary to vacuum every table in every database at least once every > two billion transactions." > why Postgresql needs to vacuum in every 2B transactions even though txid > wraps on every 4 billion transactions (double time)? Because an XID that's more than 2B transactions in the past will wrap around and be seen as a bit less than 2B transactions in the future, causing any rows bearing that XID to become invisible to current transactions. regards, tom lane