Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4xHI-00067l-5L for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Sep 2019 01:06:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i4xHG-000173-Lx for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Sep 2019 01:06:34 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4xHG-00016w-AE for pgsql-hackers@lists.postgresql.org; Tue, 03 Sep 2019 01:06:34 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4xHD-0006zY-1m for pgsql-hackers@lists.postgresql.org; Tue, 03 Sep 2019 01:06:33 +0000 Received: by mail-qt1-x843.google.com with SMTP id n7so17617901qtb.6 for ; Mon, 02 Sep 2019 18:06:30 -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=tjb8WwbKotE4/9WiUpqCCcMzNxTkqyOJWg7+yTtUK4I=; b=nZHu8Ks14P0EdbLGsxtn6nN9pX1+e+s+hxNeghIsbpYNyHhfudRyOc9FQ0kuFNlXRp fqGtdcXVJqgiDISKmpqx3xUBeiu7aN8PTm7LEfcsxW78q5ZTCH2nKpE7trjHsSYpk+uK QGno0I8M/MEGrRaFxz60LCwyVH5LgfgRU1IIE9Sby0yUNl6/xxKaz50WU1t+pDGaOl5i 2K2X9a3P69CoIJxYStAdENwcPDCZ5vZSzuUJ8oukGEKDjsaSNnGx71swS1AhCkxDbPsy GF5cXcM1ceV73Dlw9Z0BjV2EATZpLqnIZ5oVywl99v9b0cu8HUXzYEd10j93KDsucLYk NEgA== 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=tjb8WwbKotE4/9WiUpqCCcMzNxTkqyOJWg7+yTtUK4I=; b=XDY8qCvBlWdDKnU5sByj+ehItUJZrA0rjkGI8AiZb2mGj2vMLHalwBtvQL12DrvLgQ ZMYTAk7FHX06IiGpYWtoh6BOPV4dFamEvD1uB7FDfDhfUSLBQODirCnHe0zwm4ADWV4u Mk4R+VrkPyyY19uT1qd/Ayto+o+zaB+nkUpFtfGgracyiAwXT3ZOcumU8W2+DZcp9iiX XGRX+uN0t1u4b9gsCMlA2ku1reGfW+XzWq52KcMheC0nGo5ARfUvkc59jnHadjz/Rcmd Em9ozBDp9GTr7+GYWsu5PNLfBBR4U3llCnn2h35rsvfOj2rvNHA9hAJ0ggN8dcUMu71O 2qEA== X-Gm-Message-State: APjAAAXBUdG4Nyc7khcaCPtgtdm6pIKd/MOr5KQcknvVqP8XdYSTURcI NvDwnjZbs1xXNmVQSFpz1ntTA7DKFds= X-Google-Smtp-Source: APXvYqyrPJ7jPt7ho0ieBwGzfkqThuxIbJmQyKWoAn/vPqARyqbMHm5mj+x+ZWEYvJgvMkGxg7ZzSA== X-Received: by 2002:ac8:4895:: with SMTP id i21mr31141810qtq.146.1567462803373; Mon, 02 Sep 2019 15:20:03 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.57.92.168]) by smtp.gmail.com with ESMTPSA id v5sm2856459qtk.66.2019.09.02.15.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 15:20:03 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 0F6B3123A56; Mon, 2 Sep 2019 18:20:01 -0400 (-04) Date: Mon, 2 Sep 2019 18:20:01 -0400 From: Alvaro Herrera To: Tom Lane Cc: Nikita Glukhov , Alexander Korotkov , Julien Rouhaud , PostgreSQL Hackers , Thomas Munro , Marc Cousin , Tomas Vondra Subject: Re: Avoid full GIN index scan when possible Message-ID: <20190902222001.GA2704@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <19438.1565209940@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-07, Tom Lane wrote: > I think this would be committable as it stands, except that replacing > an ALL scan with an EVERYTHING scan could be a performance regression > if the index contains many null items. We need to do something about > that before committing. Nikita, any word on getting this change done? > Unfortunately I'm not sold on either 0002 or 0003 as they stand; > they seem overly complicated, I'm not convinced they're correct, > and you haven't really provided examples showing that all this > extra complexity is worthwhile. I suppose we should call ourselves satisfied if we get 0001 done during this cycle (or at least this commitfest). Further refinement can be had in the future, as needed -- even within pg13, if Nikita or anybody else wants to tackle Tom's suggested approaches (or something completely new, or just contest Tom's points) quickly enough. But I don't think we need that in order to call this CF entry committed. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services