Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kn0nb-0003Nk-Nl for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2020 14:50:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kn0na-0007Yi-Mk for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2020 14:50:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kn0na-0007YZ-GF for pgsql-hackers@lists.postgresql.org; Wed, 09 Dec 2020 14:50:34 +0000 Received: from forward2-smtp.messagingengine.com ([66.111.4.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kn0nX-0002mx-Hl for pgsql-hackers@postgresql.org; Wed, 09 Dec 2020 14:50:33 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailforward.nyi.internal (Postfix) with ESMTP id 67851194430D; Wed, 9 Dec 2020 09:50:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 09 Dec 2020 09:50:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=ViSos99WmgaExD8sUrrRhQs7m5UAMB5TlPkOVlQyj 1Q=; b=ZCPHB/IBfncK9MnJw2MgCxYEpZgIEQkhYp353xC3JEyqZ8WPVTYXdDfRz rN1lnMBMti83+bD7Wn+5d5nMEbBj9s8QugO7kR+Edckvq5OW22crt0LbDioBrhxX j/UX6wm2I+aLCs8KGflGcDHRskVP0hxYIBpxr+Sveh9Ee9w1O9K3ld5ekM7hUhFd gToMjktmllPk2RzIgnbVMI/vuuTZH92ReejqRo0x/QT/hzFserezujxbWVzk9Oof eDBMi2CKq4qrQJB8lRrvbMXgvOF6eYyNc0Q5YIYuN5hCNI/1bSHpknan9T1rIkoM UzFNbOV+s1H53BmkREOpN4NlJQbIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudejkedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeehnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeffvdeufedtgffgveff vdehjeekjeekhedvvdeuheeghfffledvgffffffffeejudenucfkphepkeejrddujeejrd ejvddrudegvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtoh hm X-ME-Proxy: Received: from april.pezone.net (p57b1488e.dip0.t-ipconnect.de [87.177.72.142]) by mail.messagingengine.com (Postfix) with ESMTPA id 251F3240062; Wed, 9 Dec 2020 09:50:28 -0500 (EST) Subject: Re: get_constraint_index() and conindid To: Michael Paquier , Tom Lane References: <4688d55c-9a2e-9a5a-d166-5f24fe0bf8db@enterprisedb.com> <3260997.1607452119@sss.pgh.pa.us> Cc: Matthias van de Meent , pgsql-hackers From: Peter Eisentraut Organization: EnterpriseDB Message-ID: <2ddf07fc-883f-f1c4-dfbc-e977a0162e66@enterprisedb.com> Date: Wed, 9 Dec 2020 15:50:26 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-12-09 07:37, Michael Paquier wrote: >>> Only thing I could think of is that it maybe could use a (small) >>> comment in the message on that/why get_constraint_index is moved to >>> utils/lsyscache from catalog/dependency, as that took me some time to >>> understand. >> >> commit message could reasonably say that maybe, but I don't think we >> need to memorialize it in a comment. lsyscache.c *is* where one >> would expect to find a simple catalog-field-fetch function like this. >> The previous implementation was not that, so it didn't belong there. > > Agreed. Thanks, I committed it with an expanded commit message. After further inspection, I'm not going to do anything about the nearby get_index_constraint() at this item. The current implementation can use an index on pg_depend. A scan of pg_constraint has no index available.