You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(replication): co-publish additional tables and reconcile existing publications
LogicalReplicationClient gains an optional additionalTables option. These are published alongside the primary table in the same publication, and their WAL events stream through the same data handler. When the publication already exists, missing tables are added via ALTER PUBLICATION ADD TABLE (online, slot-preserving) instead of erroring, so a publication can gain a table without a drop and recreate.
return`Publication '${this.options.publicationName}' exists but has NO TABLES configured. Expected table: "public.${expectedTable}". Run: ALTER PUBLICATION ${this.options.publicationName} ADD TABLE "${expectedTable}";`;
return`Publication '${this.options.publicationName}' exists but does not include the required table "public.${expectedTable}". Current tables: ${tableList}. Run: ALTER PUBLICATION ${this.options.publicationName} ADD TABLE "${expectedTable}";`;
527
+
// Reconcile rather than reject: add any configured table the publication is
528
+
// missing. ALTER PUBLICATION ... ADD TABLE is online and leaves the slot
529
+
// position intact, so an existing publication can gain a table (e.g.
530
+
// task_run_v2 alongside TaskRun) without a drop/recreate. ADD TABLE on a
531
+
// table already published raises duplicate_object (42710); treat that as a
532
+
// benign race (another instance won) rather than a failure.
0 commit comments