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 1n5GOU-0002zu-9h for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 00:12:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5GOT-00047S-18 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 00:12:37 +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 1n5GOS-00047J-OT for pgsql-hackers@lists.postgresql.org; Thu, 06 Jan 2022 00:12:36 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5GOL-000682-HJ for pgsql-hackers@postgresql.org; Thu, 06 Jan 2022 00:12:36 +0000 Received: by mail-io1-xd35.google.com with SMTP id 19so1137203ioz.4 for ; Wed, 05 Jan 2022 16:12:29 -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=w98OqATOhvYiIG3rfbioi4QUzZSb3e8TPtkBYBT5hIo=; b=x+uRI5fuQmYLSsIVRJZrpi3q/g6VVoDBAUSdUjzKd+JxkaPA8uH8vEW3M2Ns98etsB 6icwwWLZy/NgG+wOlPqoeUP0AznTKmhZ2/U0p0i7FzW9RFq4RO/qH3xbxhHI2iS+SpQf GFgaFNLwCQLpRJWskRwuD6QTzTDUvlYQ4zV9ZVC5ZCFIZWYU1xh0g9Ej87GKI1iY4+SB 2r8G/ALLnZ2DDLOEYXX9+D1Fy09nxQEAaUPgzBNS0aAi07qeGIvGsejsadZq+xo1OZnm TWicdIHTRQ4JrgWfwWY44c5hFOKWRjHRA47c4WqpkEkR395BsdBJxF7vrWCyFumDdDNM YiuA== 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=w98OqATOhvYiIG3rfbioi4QUzZSb3e8TPtkBYBT5hIo=; b=mLQnnxefYqqPR5oD1QOwXUdGdN488miGylZjkzvEWRr1MtaE2zsV0vuu+yDmFRB1dP gs5oygGl2MIPkL/1mqYVHMe0fh6ir0/49Nx8yi/kqK9zdyE2ktGBwqPikV/8vMDi4Bd8 oprFmn15wudJYuf/X5XwO6FfefHhtiAP8B8XDBC65s9og15DvUr8hPfoucjbv+IvoIHb 8jD37RBG1ZJ5yM4eUbSOXuUk/XncS8j13BMcjy8xqq11LCSJvi7WN6qv7MjUr/ILn6cH 6z3iXi5cANfKM3vMJ15bFNb78G5gPrhhH6unBD8LzdZwPLI3U5CA9x/jVRFjeJW269Ph 0Fpw== X-Gm-Message-State: AOAM53147dL9v6ceNhDsG4CtPhGuqX1lHC61NzyKC62CTzlkuoubKqxY vKyujf+A0x9RpEjM3BDJOEB2gg== X-Google-Smtp-Source: ABdhPJxZPnlVmxB09CqeOG9kVwX+QKBADY1lKC2Vj9pA9o+Njc8z9cEahaDLIlpVqxeA9CjSWcGDhQ== X-Received: by 2002:a05:6638:2174:: with SMTP id p20mr26784020jak.46.1641427947317; Wed, 05 Jan 2022 16:12:27 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n6sm205803ili.33.2022.01.05.16.12.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jan 2022 16:12:27 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 5DD1580160F; Wed, 5 Jan 2022 18:12:26 -0600 (CST) Date: Wed, 5 Jan 2022 18:12:26 -0600 From: Justin Pryzby To: Bruce Momjian Cc: "Finnerty, Jim" , Stephen Frost , Maxim Orlov , pgsql-hackers@postgresql.org Subject: Re: Add 64-bit XIDs into PostgreSQL 15 Message-ID: <20220106001226.GS14051@telsasoft.com> References: <20220104193220.GL15820@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Jan 05, 2022 at 06:51:37PM -0500, Bruce Momjian wrote: > On Tue, Jan 4, 2022 at 10:22:50PM +0000, Finnerty, Jim wrote: > > I'm concerned about the maintainability impact of having 2 new > > on-disk page formats. It's already complex enough with XIDs and > > multixact-XIDs. > > > > If the lack of space for the two epochs in the special data area is > > a problem only in an upgrade scenario, why not resolve the problem > > before completing the upgrade process like a kind of post-process > > pg_repack operation that converts all "double xmax" pages to > > the "double-epoch" page format? i.e. maybe the "double xmax" > > representation is needed as an intermediate representation during > > upgrade, but after upgrade completes successfully there are no pages > > with the "double-xmax" representation. This would eliminate a whole > > class of coding errors and would make the code dealing with 64-bit > > XIDs simpler and more maintainable. > > Well, yes, we could do this, and it would avoid the complexity of having > to support two XID representations, but we would need to accept that > fast pg_upgrade would be impossible in such cases, since every page > would need to be checked and potentially updated. > > You might try to do this while the server is first started and running > queries, but I think we found out from the online checkpoint patch that I think you meant the online checksum patch. Which this reminded me of, too. https://commitfest.postgresql.org/31/2611/ > having the server in an intermediate state while running queries is very > complex --- it might be simpler to just accept two XID formats all the > time than enabling the server to run with two formats for a short > period. My big point is that this needs more thought. -- Justin