diff --git i/src/backend/commands/tablecmds.c w/src/backend/commands/tablecmds.c
index 05593f33162..6f72b08a87d 100644
--- i/src/backend/commands/tablecmds.c
+++ w/src/backend/commands/tablecmds.c
@@ -4890,6 +4890,14 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode)
                                                table_slot_callbacks(oldrel));
             newslot = MakeSingleTupleTableSlot(newTupDesc,
                                                table_slot_callbacks(newrel));
+
+            /*
+             * Set all columns in the new slot to NULL initially, to ensure
+             * columns added as part of the rewrite are initialized to
+             * NULL. That's necessary as tab->newvals will not contain an
+             * expression for columns with a NULL default.
+             */
+            ExecStoreAllNullTuple(newslot);
         }
         else
         {
