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 1tpAgd-001PCK-Le for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Mar 2025 18:38:43 +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 1tpAgb-00Dxl1-R1 for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Mar 2025 18:38:41 +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 1tpAgb-00Dxkt-Gs for pgsql-hackers@lists.postgresql.org; Mon, 03 Mar 2025 18:38:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tpAgZ-000lhR-2R for pgsql-hackers@postgresql.org; Mon, 03 Mar 2025 18:38:40 +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 523IccGs4060267; Mon, 3 Mar 2025 13:38:38 -0500 From: Tom Lane To: jian he cc: PostgreSQL-development Subject: Re: bug when apply fast default mechanism for adding new column over domain with default value In-reply-to: <3664075.1741018726@sss.pgh.pa.us> References: <2901599.1740811424@sss.pgh.pa.us> <3086966.1740873261@sss.pgh.pa.us> <3519325.1740953319@sss.pgh.pa.us> <3664075.1741018726@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 03 Mar 2025 11:18:46 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4060265.1741027118.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 03 Mar 2025 13:38:38 -0500 Message-ID: <4060266.1741027118@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > jian he writes: >> within ATExecAddColumn, we can >> if (!missingIsNull) >> StoreAttrMissingVal(rel, attribute->attnum, missingval, missing= IsNull); >> to save some cycles? > Probably not really worth it: surely that's going to be a very > infrequent edge case. On second thought, it is worth doing like that, not on speed grounds but because we can make StoreAttrMissingVal simpler by not handling the is-null case at all. Pushed with that adjustment and some other minor polishing. regards, tom lane