Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc8BJ-00DwEy-OM for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Sep 2023 17:43:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qc8BI-00G9Ee-I7 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Sep 2023 17:43:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc8BH-00G9ED-Jw for pgsql-hackers@lists.postgresql.org; Fri, 01 Sep 2023 17:43:40 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qc8BE-002C5i-0d for pgsql-hackers@lists.postgresql.org; Fri, 01 Sep 2023 17:43:38 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 790245C017F; Fri, 1 Sep 2023 13:43:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 01 Sep 2023 13:43:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1693590214; x= 1693676614; bh=kIqaTt13flVDhALk33cj9zYQmg30qskyjaqutqsuDso=; b=d /W3EXWU96h/dCX8Bh3UgW5MbO6a/lmSk2w0h01I5FSVCSBIRL5k2eUuhClHhR+kD aB4zFEx3jRsheWyZkZtmDuA2mBHcXFNY1e44y8if65SYmz196spPiCtdlRNuJoIA xYldvwx1c9+wlFR/Ws22HZngTW4SexzxxxWxT20v6R8eQcFmMpxpDCLoR44lwBpW Qy8tp5cilfnICkWNye45i/lPlC0gNr+IPOqGryug/XULU34U/++xA4cPThD6Jf+4 UAyEHWxQwM02ANf9dyzBnLV5WNRPo1peNt4yZBU6xZnq/3SyVlVieYGhxfP+nSGe wgUEGJSqva/B+UIj2g8cA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegvddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Sep 2023 13:43:34 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1E1BAAF; Fri, 1 Sep 2023 19:43:30 +0200 (CEST) Date: Fri, 1 Sep 2023 19:43:30 +0200 From: Alvaro Herrera To: Matthias van de Meent Cc: PostgreSQL Hackers Subject: Re: GenBKI emits useless open;close for catalogs without rows Message-ID: <20230901174330.6jbe4izkew4nlt7k@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Sep-01, Matthias van de Meent wrote: > A potential addition to the patch would to stop manually closing > relations: initdb and check-world succeed without manual 'close' > operations because the 'open' command auto-closes the previous open > relation (in boot_openrel). Testing also suggests that the last opened > relation apparently doesn't need closing - check-world succeeds > without issues (incl. with TAP enabled). That is therefore implemented > in attached patch 2 - it removes the 'close' syntax in its entirety. Hmm, what happens with the last relation in the bootstrap process? Is closerel() called via some other path for that one? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Essentially, you're proposing Kevlar shoes as a solution for the problem that you want to walk around carrying a loaded gun aimed at your foot. (Tom Lane)