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 1rpUkC-00719C-1b for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 14:59:12 +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 1rpUkA-00FkHi-Sj for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2024 14:59:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpUkA-00FkHa-JS for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2024 14:59:10 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rpUk8-006o2Y-4W for pgsql-hackers@postgresql.org; Wed, 27 Mar 2024 14:59:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 42REx6SI3305403; Wed, 27 Mar 2024 10:59:06 -0400 From: Tom Lane To: Richard Guo cc: PostgreSQL-development Subject: Re: Remove some redundant set_cheapest() calls In-reply-to: References: <3166037.1711483618@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Wed, 27 Mar 2024 15:06:50 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3305401.1711551546.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 27 Mar 2024 10:59:06 -0400 Message-ID: <3305402.1711551546@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > On Wed, Mar 27, 2024 at 4:06 AM Tom Lane wrote: >> I'm less convinced about changing this. I'd rather keep it consistent >> with mark_dummy_rel. > Hm, I wonder if we should revise the comment there that states "but not > when called from elsewhere", as it does not seem to be true. I'd be okay with wording like "This is redundant in current usage because set_rel_pathlist will do it later, but it's cheap so we keep it for consistency with mark_dummy_rel". What do you think? regards, tom lane