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.96) (envelope-from ) id 1wJtXd-000OVo-1v for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 13:40:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wJtXb-007NhV-2F for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 13:40:55 +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.96) (envelope-from ) id 1wJtXb-007NhH-1L for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 13:40:55 +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.98.2) (envelope-from ) id 1wJtXZ-000000009Ns-0eD3 for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 13:40:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 644Dem3b187782; Mon, 4 May 2026 09:40:48 -0400 From: Tom Lane To: SATYANARAYANA NARLAPURAM cc: PostgreSQL Hackers , =?UTF-8?Q?=C3=81lvaro_Herrera?= , Antonin Houska Subject: Re: [Bug]Vacuum full silently NULL out fast default columns In-reply-to: References: Comments: In-reply-to SATYANARAYANA NARLAPURAM message dated "Mon, 04 May 2026 02:17:08 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <187780.1777902048.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 04 May 2026 09:40:48 -0400 Message-ID: <187781.1777902048@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk SATYANARAYANA NARLAPURAM writes: > VACUUM FULL silently turns columns added via ALTER TABLE ... ADD COLUMN ... > DEFAULT into NULL > on all pre-existing rows. The issue exists for other operations like > CLUSTER, REPACK. That is a seriously awful bug. Fortunately it is not in any shipping release. A quick bisect run agrees that it broke here: 28d534e2ae0ac888b5460f977a10cd9bb017ef98 is the first bad commit commit 28d534e2ae0ac888b5460f977a10cd9bb017ef98 (HEAD) Author: Álvaro Herrera Date: Mon Apr 6 21:55:08 2026 +0200 Add CONCURRENTLY option to REPACK > Patch attached. Added a regression test in fast_default.sql covering > VACUUM FULL, CLUSTER, and REPACK on a table with fast-default columns > including a NOT NULL CHECK column. I don't know if this is the best code fix (I don't like putting extra checks into a loop condition like this). But I agree we need some more tests covering this area. regards, tom lane