Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLbqt-00029h-DH for pgsql-committers@arkaria.postgresql.org; Sat, 10 Nov 2018 22:35:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gLbqq-0007Tt-Gc for pgsql-committers@arkaria.postgresql.org; Sat, 10 Nov 2018 22:35:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLbqo-0007TH-Ob for pgsql-committers@lists.postgresql.org; Sat, 10 Nov 2018 22:35:36 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLbql-0000lh-Ec for pgsql-committers@lists.postgresql.org; Sat, 10 Nov 2018 22:35:33 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6079A215AC; Sat, 10 Nov 2018 17:35:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 10 Nov 2018 17:35:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=xmMbHg8zEynMvJ6NyYHsQ3vUr8L dUucueo0C71HLqXk=; b=RrpnvyA/xOkIS93Ugf/eN70R2F4EGciiHUByQIOKDc2 H7RfzmrOm/8WPjLNJ3H4D0z3e4Ktf5TB/0OLGzwPntqRpwwFYNSbfHjUHm/JWHTc MapkEDaqRVKW+kS5LCDLF7T/47HXsTmLQtCqJhrNZvpJqK86IS4PthvrsSOv0yTW ISJ4A5fWvMk9GVz4s6G0JBRkjWNOjpT5a0agwU240j5U2K/bgHySpeZ607NdbbXG n6T3g2GjRxsfp+IrL1rFdJ40RXhEuvTNt17Em/g8BdMHWefb+SJdoPbL6Gwv1RJW UKZGNio6ErRY4hLAJke1GVK2PxhOp0VH1KjwbT3leTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=xmMbHg 8zEynMvJ6NyYHsQ3vUr8LdUucueo0C71HLqXk=; b=VDjgxExociI4voPjt8yRZM g/pf1gUTRHx4X7UeohVvjleDAXsJvKo1FvIjBr3j9X5445l0FwGi3hj0HvwOp2gD Y9L6tqgr0TQ+lUZoqKOZLceiSfG1oKOCeApjOJuJjiXheTX/TcA8161mTtjFF/2+ AZzkx5ZWH2bdPL1S5N3BsTVl/IdbUzK1i4PGECCNcB0HeeP+hKJ72e5D+fZBv48g +OuBDUhN+M1DgnidzsYUboVlFoM1Kn8hWBPqKlNvBjsGbFPeFvF6oqa/9mDap/Jd M7M0YSifLLLSOiG+TOsJtZLHvm8M0i0w9PQpqKQDKSGqVYhO3kqkojaYyTFbNJ7Q == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id AF20BE4675; Sat, 10 Nov 2018 17:35:29 -0500 (EST) Date: Sat, 10 Nov 2018 14:35:27 -0800 From: Andres Freund To: David Rowley Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Remove ineffective check against dropped columns from slot_getat Message-ID: <20181110223527.e6ucv3vphzzdpfor@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-11-11 01:11:34 +1300, David Rowley wrote: > On 10 November 2018 at 14:41, Andres Freund wrote: > > These days locking and plan invalidation ought to ensure that dropped > > columns are not accessed in query plans. Therefore this commit just > > drops the insufficient check in slot_getattr(). It's possible that > > we'll find some holes againt use of dropped columns, but if so, those > > need to be addressed independent of slot_getattr(), as most accesses > > don't go through that function anyway. > > Would it not be worth an Assert(!TupleDescAttr(tupleDesc, attnum - > 1)->attisdropped); so that we're more likely to discover any issues > where cached plans are not invalidated correctly? I don't think it'd really do much. Only very few reads of tuples though through slot_getattr(). The expression eval machinery - which will be used for those cases - does verify this on the first execution of an expression. C.f. CheckVarSlotCompatibility(). If you, or somebody else, feels strongly, we can add one, but I don't really see the point here. Greetings, Andres Freund