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 1lThLk-00069Z-NA for pgsql-general@arkaria.postgresql.org; Tue, 06 Apr 2021 08:46:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lThLj-0000Ed-Lx for pgsql-general@arkaria.postgresql.org; Tue, 06 Apr 2021 08:46: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 1lThLj-0000EW-Ei for pgsql-general@lists.postgresql.org; Tue, 06 Apr 2021 08:46:15 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lThLg-0004NA-Vw for pgsql-general@lists.postgresql.org; Tue, 06 Apr 2021 08:46:15 +0000 Received: by mail-ed1-x52f.google.com with SMTP id p4so5279042edr.2 for ; Tue, 06 Apr 2021 01:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=blHZs6FYzzCAT/wW4c0uNXPb9D7dzioYhB8NdshfGKk=; b=16Ge2SiyV+GHjt99n1EEg+wpvWPYNUAioIxLu2BwV23Cxv54mzJCiR8bRWFbw2ZDSO PjfW4rmbOxSitxyQYih6GARxW2sBF9bETXWpqCExW0KJltchIDYK7U91nBzflkgq7St3 VvkhEQCt/JX9p0yMAZY+lhTCYKq3aGptwYYIb2IixBeFKaOmXowJyV1boxMzj20CWbrS z+kdk8Oh/ycFgDaV5xXjlHsXIxXBTdkzoVlJ/7eEC7WsK4fl/4Mh4VRcHsV0Y94lNOWr DKV+13CYg2/F9DAX1AjbY3hCBT9RnI48AjaLxex3eZAiEHZ6YNqwnJ9RK8yjS0UWhuFM v7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=blHZs6FYzzCAT/wW4c0uNXPb9D7dzioYhB8NdshfGKk=; b=PTE8YvmG0YuehO7pLcxZe6Vyb9rZy7/vD4PgLGFHxbBdemtUeGFESfAotkspxS5Mtk MB8U1f07DQled2BcrnIkFM8KSKA5GXF4yJkUkpK6iFws25/A0H+QjQKzhFVWdkS18F82 DDOwj6NkXv3c9wJ727u2kII3eEySO6NCmuKl/cHasi1PEEkRPC2j6uJigK8JVdcbe2RP RKPI05P8YkG4PRTbUl0ELa3n4lyc4S2Iv18e9Skurj/jhMjSSHbd4ATBgYMs0mY6wEVM mPRBKK6VbV1XAyoX3VffVPujC0CwDv3MzNI9bE+KN6PWhKEGnxAWMedAaEoKvm2+YKD1 n3rQ== X-Gm-Message-State: AOAM5302PlyiwR4ga0hz3KhqKaomirDvE+S0PmveFiciUyS5GBio1dL3 uwAvijogjqnGQ/0kAgfsOQ9c8w== X-Google-Smtp-Source: ABdhPJzyVXtUYj7LUNM4TVMISGM5SK+mSgeqvuGfqFWkeuAO9viHhEICg44+V7GlJ9RTLswMrnj0hQ== X-Received: by 2002:aa7:d687:: with SMTP id d7mr35806124edr.118.1617698772293; Tue, 06 Apr 2021 01:46:12 -0700 (PDT) Received: from localhost.localdomain (217-149-170-45.nat.highway.telekom.at. [217.149.170.45]) by smtp.gmail.com with ESMTPSA id a22sm13248778edu.14.2021.04.06.01.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 01:46:12 -0700 (PDT) Message-ID: Subject: Re: questions about wraparound From: Laurenz Albe To: Luca Ferrari , Jehan-Guillaume de Rorthais Cc: pgsql-general Date: Tue, 06 Apr 2021 10:46:08 +0200 In-Reply-To: References: <20210402102900.7ae6e665@firost> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2021-04-03 at 15:22 +0200, Luca Ferrari wrote: > why having a TransactionId that is 32 bits > in depth while it is exposed (thru txid_current()) as a 64 bits value? > I mean, having 64 bits would reduce the need for anti-wrap arpund > vacuum. I suspect the usage of 32 bits is both for compatibility and > tuple header size, but I'm just guessing. Because there are two of these transaction IDs stored on each tuple (xmin and xmax) to determine its visibility. The overhead of 8 bytes per tuples for visibility is already pretty high. Another downside is that changing this would prevent the use of pg_upgrade for upgrading, as the on-disk format changes. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com