We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 687338e commit 05e170cCopy full SHA for 05e170c
1 file changed
pg_rewrite.c
@@ -1463,12 +1463,12 @@ setup_decoding(Oid relid, TupleDesc tup_desc)
1463
oldcontext = MemoryContextSwitchTo(TopTransactionContext);
1464
1465
/*
1466
- * In order to be able to run partition_table() in each database
1467
- * independently, thus the slot name should be database-specific.
+ * In order to be able to run partition_table() for multiple tables at a
+ * time, slot name should contain both database OID and relation OID.
1468
*/
1469
buf = makeStringInfo();
1470
appendStringInfoString(buf, REPL_SLOT_BASE_NAME);
1471
- appendStringInfo(buf, "%u", MyDatabaseId);
+ appendStringInfo(buf, "%u_%u", MyDatabaseId, relid);
1472
#if PG_VERSION_NUM >= 140000
1473
ReplicationSlotCreate(buf->data, true, RS_EPHEMERAL, false);
1474
#else
0 commit comments