Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVMrm-00036L-6K for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2016 17:55:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bVMrl-0006AA-C0 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2016 17:55:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVMqO-00048T-Iz for pgsql-hackers@postgresql.org; Thu, 04 Aug 2016 17:54:08 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bVMqL-0001Q9-G5 for pgsql-hackers@postgresql.org; Thu, 04 Aug 2016 17:54:08 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1bVMqK-0008Lj-3z; Thu, 04 Aug 2016 13:54:04 -0400 Date: Thu, 4 Aug 2016 13:54:04 -0400 From: Bruce Momjian To: Pavan Deolasee Cc: pgsql-hackers Subject: Re: Heap WARM Tuples - Design Draft Message-ID: <20160804175404.GS1702@momjian.us> References: <20160804170553.GL1702@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160804170553.GL1702@momjian.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Thu, Aug 4, 2016 at 01:05:53PM -0400, Bruce Momjian wrote: > > Approach 2 seems more reasonable and simple.  > > > > There are only 2 bits for lp_flags and all combinations are already used. But > > for LP_REDIRECT root line pointer, we could use the lp_len field to store this > > special flag, which is not used for LP_REDIRECT line pointers. So we are able > > to mark the root line pointer. > > Uh, as I understand it, we only use LP_REDIRECT when we have _removed_ > the tuple that the ctid was pointing to, but it seems you would need to > set HEAP_RECHECK_REQUIRED earlier than that. > > Also, what is currently in the lp_len field for LP_REDIRECT? Zeros, or > random data? I am asking for pg_upgrade purposes. It seems LP_REDIRECT's lp_len is always zero: :-) /* * ItemIdSetRedirect * Set the item identifier to be REDIRECT, with the specified link. * Beware of multiple evaluations of itemId! */ #define ItemIdSetRedirect(itemId, link) \ ( \ (itemId)->lp_flags = LP_REDIRECT, \ (itemId)->lp_off = (link), \ (itemId)->lp_len = 0 \ ^^^^^^^^^^ ) -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers