Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXIvw-0007Kt-Aa for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Aug 2016 02:07:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bXIvv-0005rt-8N for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Aug 2016 02:07:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bXIvu-0005rm-Jd for pgsql-hackers@postgresql.org; Wed, 10 Aug 2016 02:07:50 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bXIvn-0000Ea-MG for pgsql-hackers@postgresql.org; Wed, 10 Aug 2016 02:07:49 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1bXIvl-0005c9-Vl; Tue, 09 Aug 2016 22:07:41 -0400 Date: Tue, 9 Aug 2016 22:07:41 -0400 From: Bruce Momjian To: Jim Nasby Cc: Pavan Deolasee , Claudio Freire , pgsql-hackers Subject: Re: Heap WARM Tuples - Design Draft Message-ID: <20160810020741.GA21285@momjian.us> References: <20160806014035.GD26927@momjian.us> <20160806030433.GE26927@momjian.us> <20160806145121.GF26927@momjian.us> <20160807144945.GA22146@momjian.us> <20160807165501.GA16416@momjian.us> <20160808173810.GD16416@momjian.us> <20160808201907.GF16416@momjian.us> <3d8ebf8f-f730-a8f9-a9ee-176530132036@BlueTreble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3d8ebf8f-f730-a8f9-a9ee-176530132036@BlueTreble.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.3 (--) 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 Tue, Aug 9, 2016 at 06:19:57PM -0500, Jim Nasby wrote: > On 8/8/16 3:19 PM, Bruce Momjian wrote: > >>What will help, and something I haven't yet applied any thoughts, is when we > >>> can turn WARM chains back to HOT by removing stale index entries. > >I can't see how we can ever do that because we have multiple indexes > >pointing to the chain, and keys that might be duplicated if we switched > >to HOT. Seems only VACUUM can fix that. > > Are these changes still predicated on being able to re-find all index > entries by key value? If so, that makes incremental vacuums practical, > perhaps eliminating a lot of these issues. No, the increment/decrement doesn't require btree lookups. > >>>> > We can't use the bits LP_REDIRECT lp_len because we need to create WARM > >>>> > chains before pruning, and I don't think walking the pre-pruned chain is > >>>> > worth it. (As I understand HOT, LP_REDIRECT is only created during > >>>> > pruning.) > >>> > >>> That's correct. But lp_len provides us some place to stash information from > >>> heap tuples when they are pruned. > >Right. However, I see storing information at prune time as only useful > >if you are willing to scan the chain, and frankly, I have given up on > >chain scanning (with column comparisons) as being too expensive for > >its limited value. > > What if some of this work happened asynchronously? I'm thinking something > that runs through shared_buffers in front of bgwriter. Well, we prune when we need the space --- that is the big value of page pruning, that it is fast can be done when you need it. VACUUM is all about background cleanup. -- 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