Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpzul-0005k1-Cp for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2017 16:12:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cpzuk-00049d-Vz for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2017 16:12:11 +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 1cpzui-00047c-VD for pgsql-hackers@postgresql.org; Mon, 20 Mar 2017 16:12:09 +0000 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cpzug-0006Fn-Gd for pgsql-hackers@postgresql.org; Mon, 20 Mar 2017 16:12:07 +0000 Received: by mail-qk0-x230.google.com with SMTP id 1so114075323qkl.3 for ; Mon, 20 Mar 2017 09:12:06 -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=mZm64lGJ0CP28qF9V9sk1xTDkBlCEXta4XdHNcdHvec=; b=fC14x905syZygJ+roCLMSmKZmm4JI4We5GDyX+WiE0c4/IQ2sl3fCan+nowE9bKcIT /Ugw58VvuVD0BvL4SkLvgtDdSkv8S/5usUX+DBa+8Cb1sMG9xKJHyzygofFG82yt4fHd ZtXqhYosqHR6nXy7Bt65HDlCCifrBISoUeRYMEonrMnzhx7TsmXz92xGaELkzX36I9Ef MbCCWMSs+dwaOUEZpo7PHypI58ur9LUKD8T8kFOr1pTt9O1PIDrxJq6mv39vYK8ipqvZ 7i3sYi0wLx4X97QaW4G9bHB9U/2bpbySPcSdyemxkxxrKsVtxrR13XNZzG2fBmyoYRmG AViQ== 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=mZm64lGJ0CP28qF9V9sk1xTDkBlCEXta4XdHNcdHvec=; b=Dl6nCmJbYjPFISs2iv0Vq+GeifLPlq7XazP1ueDaMzIYDvsp2ymwAyBk9TZiRWN4da 4f/9VlZUn051xR4Uw/NYLik/qyHVJj2wNe8AxAeXh18ESw37CJjAiVoUgxWxivzMl7U5 PlwhZ/S+Ec5qCwOQy0BzIYgEanJqV3lnCHxe5pjqZaZEbPK0n23N9crVV036FgiKrRbV CXnb/ps7IGWzvsEt4GBujYhqI1I4aKWT2xVW7SDncOk85ynmUkvWkxLc0Q4VRJTS6y4p Jre4lEZQpxd6fHpM5o4LFNyKxDMEXYfszoNUE6nDPmpoNfZLhLaT3qJSUvfOrK8kEeUO BQew== X-Gm-Message-State: AFeK/H1SoLqr9QKJiedAUy6jNvVGBpdeVuIY9wuVN68at+mbmvxK24GFkeHgDuz13Zm7UnFL X-Received: by 10.55.189.133 with SMTP id n127mr25140709qkf.129.1490026325641; Mon, 20 Mar 2017 09:12:05 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id 44sm8221391qtn.56.2017.03.20.09.12.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2017 09:12:04 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id E4F4E142C; Mon, 20 Mar 2017 13:12:02 -0300 (CLST) Date: Mon, 20 Mar 2017 13:12:02 -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: <20170320161202.dytk3ski7f7yldj6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Pavan Deolasee wrote: > On Tue, Mar 14, 2017 at 7:17 AM, Alvaro Herrera > wrote: > > I didn't like this comment very much. But it's not necessary: you have > > already given relcache responsibility for setting rd_supportswarm. The > > only problem seems to be that you set it in RelationGetIndexAttrBitmap > > instead of RelationGetIndexList, but it's not clear to me why. I think > > if the latter function is in charge, then we can trust the flag more > > than the current situation. > > I looked at this today. AFAICS we don't have access to rd_amroutine in > RelationGetIndexList since we don't actually call index_open() in that > function. Would it be safe to do that? I'll give it a shot, but thought of > asking here first. Ah, you're right, we only have the pg_index tuple for the index, not the pg_am one. I think one pg_am cache lookup isn't really all that terrible (though we should ensure that there's no circularity problem in doing that), but I doubt that going to the trouble of invoking the amhandler just to figure out if it supports WARM is acceptable. -- Á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