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 1lJf9C-0001Zt-TN for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Mar 2021 16:23:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJf9B-0003L1-Rt for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Mar 2021 16:23:49 +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 1lJf9B-0003Ku-Kk for pgsql-hackers@lists.postgresql.org; Tue, 09 Mar 2021 16:23:49 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJf99-00040l-0y for pgsql-hackers@postgresql.org; Tue, 09 Mar 2021 16:23:49 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lJf94-0003lI-E2; Tue, 09 Mar 2021 11:23:42 -0500 Date: Tue, 9 Mar 2021 11:23:42 -0500 From: Bruce Momjian To: "Bossart, Nathan" Cc: Andres Freund , "pgsql-hackers@postgresql.org" , "McAlister, Grant" , "Mlodgenski, Jim" , "Nasby, Jim" , "Hsu, John" Subject: Re: partial heap only tuples Message-ID: <20210309162342.GA26575@momjian.us> References: <2ECBBCA0-4D8D-4841-8872-4A5BBDC063D2@amazon.com> <20210213162623.4upmsuzwv2anqoqx@alap3.anarazel.de> <962E672B-E874-4EF3-AEE0-85E54AA083A9@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <962E672B-E874-4EF3-AEE0-85E54AA083A9@amazon.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Feb 15, 2021 at 08:19:40PM +0000, Bossart, Nathan wrote: > Yeah, this is something I'm concerned about. I think adding a bitmap > of modified columns to the header of PHOT-updated tuples improves > matters quite a bit, even for single-page vacuuming. Following is a > strategy I've been developing (there may still be some gaps). Here's > a basic PHOT chain where all tuples are visible and the last one has > not been deleted or updated: > > idx1 0 1 2 3 > idx2 0 1 2 > idx3 0 2 3 > lp 1 2 3 4 5 > tuple (0,0,0) (0,1,1) (2,2,1) (2,2,2) (3,2,3) > bitmap -xx xx- --x x-x First, I want to continue encouraging you to work on this because I think it can yield big improvements. Second, I like the wiki you created. Third, the diagram above seems to be more meaningful if read from the bottom-up. I suggest you reorder it on the wiki so it can be read top-down, maybe: > lp 1 2 3 4 5 > tuple (0,0,0) (0,1,1) (2,2,1) (2,2,2) (3,2,3) > bitmap -xx xx- --x x-x > idx1 0 1 2 3 > idx2 0 1 2 > idx3 0 2 3 Fourth, I know in the wiki you said create/drop index needs more research, but I suggest you avoid any design that will be overly complex for create/drop index. For example, a per-row bitmap that is based on what indexes exist at time of row creation might cause unacceptable problems in handling create/drop index. Would you number indexes? I am not saying you have to solve all the problems now, but you have to keep your eye on obstacles that might block your progress later. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee