Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYzcs-0005na-Ru for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2015 16:50:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZYzcr-0004NT-QC for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2015 16:50:37 +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) (envelope-from ) id 1ZYzbW-0000Hh-8i for pgsql-hackers@postgresql.org; Mon, 07 Sep 2015 16:49:14 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZYzbT-0007Mq-KZ for pgsql-hackers@postgresql.org; Mon, 07 Sep 2015 16:49:13 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 606F5860003; Mon, 7 Sep 2015 18:49:10 +0200 (CEST) Date: Mon, 7 Sep 2015 18:49:08 +0200 From: Andres Freund To: Alvaro Herrera Cc: Amit Kapila , pgsql-hackers Subject: Re: Speed up Clog Access by increasing CLOG buffers Message-ID: <20150907164908.GB5084@alap3.anarazel.de> References: <20150903114137.GE27649@awork2.anarazel.de> <20150907133410.GO2912@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150907133410.GO2912@alvherre.pgsql> X-Pg-Spam-Score: -4.2 (----) 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 Hi, On 2015-09-07 10:34:10 -0300, Alvaro Herrera wrote: > I wonder if it would make sense to explore an idea that has been floated > for years now -- to have pg_clog pages be allocated as part of shared > buffers rather than have their own separate pool. That way, no separate > hardcoded allocation limit is needed. It's probably pretty tricky to > implement, though :-( I still think that'd be a good plan, especially as it'd also let us use a lot of related infrastructure. I doubt we could just use the standard cache replacement mechanism though - it's not particularly efficient either... I also have my doubts that a hash table lookup at every clog lookup is going to be ok performancewise. The biggest problem will probably be that the buffer manager is pretty directly tied to relations and breaking up that bond won't be all that easy. My guess is that the best bet here is that the easiest way to at least explore this is to define pg_clog/... as their own tablespaces (akin to pg_global) and treat the files therein as plain relations. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers