Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aobz5-0001iP-P8 for pgsql-committers@arkaria.postgresql.org; Fri, 08 Apr 2016 19:22:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aobz5-0000rk-Bf for pgsql-committers@arkaria.postgresql.org; Fri, 08 Apr 2016 19:22:23 +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_2) (envelope-from ) id 1aobz5-0000rd-4I for pgsql-committers@postgresql.org; Fri, 08 Apr 2016 19:22:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aobz2-0006yU-0W for pgsql-committers@postgresql.org; Fri, 08 Apr 2016 19:22:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u38JMFb1026650; Fri, 8 Apr 2016 15:22:15 -0400 From: Tom Lane To: Anastasia Lubennikova cc: pgsql-committers@postgresql.org Subject: Re: pgsql: CREATE INDEX ... INCLUDING (column[, ...]) In-reply-to: <1460141998856-5897721.post@n5.nabble.com> References: <9832.1460140193@sss.pgh.pa.us> <1460141998856-5897721.post@n5.nabble.com> Comments: In-reply-to Anastasia Lubennikova message dated "Fri, 08 Apr 2016 11:59:58 -0700" Date: Fri, 08 Apr 2016 15:22:15 -0400 Message-ID: <26649.1460143335@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Anastasia Lubennikova writes: > The answer to the question about expressions is quite simple - they are not > supported by index-only scan, so having them in covering index now is just > wasting of disc space. Well, it's true that the planner can't handle them easily in IOS, but your claim that that makes them useless is exactly backwards. As an example, consider an index on x with f(x) as an extra column. The planner *could* make use of f(x), at least in simple cases, because the presence of x would bypass the lack of intelligence in check_index_only(). In any case, work is afoot to fix that planner restriction, so I do not think we should add features that expect it to be a permanent part of the landscape. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers