Skip to content

Commit 8a0a67a

Browse files
committed
Honor SkipIcebergDDLProcessing in PostProcessRenameWritablePgLakeTable
ProcessAlterTable already short-circuits when SkipIcebergDDLProcessing is set, but rename goes through a different post-process path. Without this guard, the external-write sync's RENAME COLUMN would trigger a duplicate metadata write on top of the externally-supplied metadata.
1 parent 9726fc6 commit 8a0a67a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pg_lake_table/src/ddl/alter_table.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,14 @@ PostProcessRenameWritablePgLakeTable(ProcessUtilityParams * params, void *arg)
692692
!(renameStmt->renameType == OBJECT_TABLE ||
693693
renameStmt->renameType == OBJECT_FOREIGN_TABLE))
694694
{
695+
/*
696+
* When syncing from externally-written Iceberg metadata, the rename
697+
* is already reflected in the new metadata file; skip our own DDL
698+
* tracking and metadata write.
699+
*/
700+
if (SkipIcebergDDLProcessing)
701+
return;
702+
695703
/* schema has changed, update the metadata */
696704
IcebergDDLOperation *ddlOperation = palloc0(sizeof(IcebergDDLOperation));
697705

0 commit comments

Comments
 (0)