Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnq4o-0008Ta-3Z for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Mar 2017 17:17:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cnq4n-0007De-MQ for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Mar 2017 17:17:37 +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 1cnq4m-00079B-1z for pgsql-hackers@postgresql.org; Tue, 14 Mar 2017 17:17:36 +0000 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cnq4j-0007by-Cw for pgsql-hackers@postgresql.org; Tue, 14 Mar 2017 17:17:34 +0000 Received: by mail-qt0-x234.google.com with SMTP id i34so60923492qtc.0 for ; Tue, 14 Mar 2017 10:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vp7Fk6zaPy4UYXHiQBoJYjor9xyV/M2Rg78Om65VSk4=; b=ye8u7Urm0RELMO9aQtlRsGtwZ7ZybD/ue7dM6YY7ZBm/XhekZZCL4rX8aVN8Nz6Ln0 DrSlKroI+3vWbvo2ZQkrDZaiDPV7GJB+ylmC6fLzXcSsGrVvWPSFY7p4cp2bzUEsFB0Z hQT/dgz7EXotSIt8Nmcob8BA65Ca6yUy4PslspHEvqB0Hb1EEc5BEpmG0xS2KT+e2zny GTHIZSTsl7qhpZ5mblLmqR9+pPy1viN3AtzSecSGJSE3MKnl07FTwJyaLVb1MycyWPom YXRq91dNVCAyjXWCH1cTAfyI/SyHiMgm2eusQeu6fbu6rIQhKjtFjprweH0RYdXMA7Lm l6Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vp7Fk6zaPy4UYXHiQBoJYjor9xyV/M2Rg78Om65VSk4=; b=gTqrXjV7OgV3OtHpBsfyO0CNYV9XpQcQQSmudW4M8mUxrj8MZDtPKnQkk1mrdiWg7c yXb8yGjeNZcOb8OwZ6bo3W8SAdNNAEEr1J9Kh5ewT9ZoglA33OoSFjCj/SIz2V66zsQc TYxPmef99KmPJCejVMRvH8G+JL9oPuRNU8EBq5IaO0o1Xged+Vx45BWRWRYGy1qdBxq8 POiF49zxG2ORcvifEsLMtF2wYmlw0zG8fJKFyuFjZgHgaRd3UlbVvzeBpMFUJ4ENQzxq qPgYYCCEBq7ml3G73ffcfDVkB3De/Pa3A5m8ItfJ7MyYLHQVmigFNqegkDLAx8+Z+0S8 Ad8g== X-Gm-Message-State: AMke39m9GQ9J2iqDlF46U2ZWjVFYe+l1bHo6GN/+EnPSY+C+T3Ns8VaP08eNGodYqXg0oCKj X-Received: by 10.200.52.161 with SMTP id w30mr38429217qtb.69.1489511851973; Tue, 14 Mar 2017 10:17:31 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id f66sm14769167qkj.13.2017.03.14.10.17.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Mar 2017 10:17:31 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 6A21BDA0; Tue, 14 Mar 2017 14:17:29 -0300 (CLST) Date: Tue, 14 Mar 2017 14:17:29 -0300 From: Alvaro Herrera To: Pavan Deolasee Cc: Robert Haas , Bruce Momjian , Jaime Casanova , Haribabu Kommi , Tomas Vondra , pgsql-hackers Subject: Re: Patch: Write Amplification Reduction Method (WARM) Message-ID: <20170314171729.uxca6t3pjb3xiwed@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170308171452.g5dy64sjdltnyz6h@alvherre.pgsql> User-Agent: NeoMutt/20170206-195-7adf12 (1.7.2) X-Pg-Spam-Score: -2.6 (--) 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 After looking at how index_fetch_heap and heap_hot_search_buffer interact, I can't say I'm in love with the idea. I started thinking that we should not have index_fetch_heap release the buffer lock only to re-acquire it five lines later, so it should keep the buffer lock, do the recheck and only release it afterwards (I realize that this means there'd be need for two additional "else release buffer lock" branches); but then this got me thinking that perhaps it would be better to have another routine that does both call heap_hot_search_buffer and then call recheck -- it occurs to me that what we're doing here is essentially heap_warm_search_buffer. Does that make sense? Another thing is BuildIndexInfo being called over and over for each recheck(). Surely we need to cache the indexinfo for each indexscan. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers