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 1n5ro2-00060n-VC for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 16:09:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5ro1-0001Iz-R4 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 16:09:29 +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 1n5ro1-0001Ip-Dr for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 16:09:29 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5rnw-0008Qv-Rf for pgsql-hackers@postgresql.org; Fri, 07 Jan 2022 16:09:28 +0000 Received: by mail-io1-xd36.google.com with SMTP id h23so7594717iol.11 for ; Fri, 07 Jan 2022 08:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rHKuKsWGA0zgi6Fr+lxAuemq4sI5ffFx6o9ka1dOaCw=; b=Jn98daXEbnFxaLFZaybX4WqAb+onywYxHVJb7CN3Mb688P+YPsbCdk68rk1b7Cxr66 43tZrAoTo8u1PFGa9crEzqS3N9ZYlqCVwvRELU4S0Hb2gLh6BB3nEfYaRLbRi/95IInT Fe9kdRnCYlJYQ6wtDaSQ0YtVZpXpIDbAbRDifgbsAdv2Z0PTOLXg0qsJ3xmqPx3Okf4l Zs6dySN7uGrDVxeQp6Z9GInKKpttDeUEb5DiPbXcEr9hNz0efXhJBvTlOjhwK+vTzFns xY0Rr4cZauDOaIIKVd0MiIRdrpEoD68xUSGLaXqLjqOaZsv8VUkMPM6Bca1RZk1IATYc c5tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rHKuKsWGA0zgi6Fr+lxAuemq4sI5ffFx6o9ka1dOaCw=; b=xVZVZGwFnGaTqwddiHmqO0pNw6W4vlniZSAMItK8gmLG9tC2rWZcsveelmOILgRfgP EjHZa4ZaeqB0zrQP3juCWVTkXw2zopnKvDin/1OsOoxx0rXn1/UO4SAU5moWlQpTdm3R VhK556fxpbJxMhKPlcXymdix+S0xs7wHqAYqB5c13I8rEVfvBmWEbhbnb09zstSCsDWC FKFckRK3ypPMrjaKGI7HDqeDMRV+Vns+08Opqyd/cMvSzALWDAWRVL/HqLqJQZWjw99G wtKpdC+JLctU08am4NRm+gaBCsjb12kf31+7b0x/K7NT5VemFPJ9L0uj/arXaVGsvwJy ZUZQ== X-Gm-Message-State: AOAM530v5ygVJ+DWmGXfT5dMqCREXjyhbfl05XcbkRM+HFvuSsa7w2Kh 2yE+0xPOUXlgwiSpfrnL8nNS0A== X-Google-Smtp-Source: ABdhPJymcMsQrDanO3ZuGqOwhCTfg6l+ap48J2k+tMZyijtICAa8IOPjYXr9+tj/bAHKOt2FdRm9BQ== X-Received: by 2002:a05:6638:190f:: with SMTP id p15mr30002750jal.82.1641571763086; Fri, 07 Jan 2022 08:09:23 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id g20sm3629172iov.35.2022.01.07.08.09.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jan 2022 08:09:22 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B689A800BC8; Fri, 7 Jan 2022 10:09:21 -0600 (CST) Date: Fri, 7 Jan 2022 10:09:21 -0600 From: Justin Pryzby To: "Finnerty, Jim" Cc: Alexander Korotkov , Maxim Orlov , pgsql-hackers@postgresql.org Subject: Re: Add 64-bit XIDs into PostgreSQL 15 Message-ID: <20220107160921.GD14051@telsasoft.com> References: <20220104193220.GL15820@tamriel.snowman.net> <6960BD21-E46F-4682-9A59-17716B346019@amazon.com> <9AFAF000-2E9E-443E-9EC3-7B67D6A03E5B@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9AFAF000-2E9E-443E-9EC3-7B67D6A03E5B@amazon.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 07, 2022 at 03:53:51PM +0000, Finnerty, Jim wrote: > I'd still like a plan to retire the "double xmax" representation eventually. Previously I suggested that this could be done as a post-process, before upgrade is complete, but that could potentially make upgrade very slow. > > Another way to retire the "double xmax" representation eventually could be to disallow "double xmax" pages in subsequent major version upgrades (e.g. to PG16, if "double xmax" pages are introduced in PG15). This gives the luxury of time after a fast upgrade to convert all pages to contain the epochs, while still providing a path to more maintainable code in the future. Yes, but how are you planning to rewrite it? Is vacuum enough? I suppose it'd need FREEZE + DISABLE_PAGE_SKIPPING ? This would preclude upgrading "across" v15. Maybe that'd be okay, but it'd be a new and atypical restriction. How would you enforce that it'd been run on v15 before upgrading to pg16 ? You'd need to track whether vacuum had completed the necessary steps in pg15. I don't think it'd be okay to make pg_upgrade --check to read every tuple. The "keeping track" part is what reminds me of the online checksum patch. It'd be ideal if there were a generic solution to this kind of task, or at least a "model" process to follow. -- Justin