diff options
| author | Amit Kapila | 2021-02-15 01:58:02 +0000 |
|---|---|---|
| committer | Amit Kapila | 2021-02-15 01:58:02 +0000 |
| commit | d9b0767becf5f41e4f001d8381e6a89941efa5b2 (patch) | |
| tree | bc5704047c69209269b7b683ed0aca8604c393cf /src/backend/commands/subscriptioncmds.c | |
| parent | 637668fb1d17ad789e392a40ff09694ff1aabffb (diff) | |
Fix the warnings introduced in commit ce0fdbfe97.
Author: Amit Kapila
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/commands/subscriptioncmds.c')
| -rw-r--r-- | src/backend/commands/subscriptioncmds.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 5cf874e0b46..e5ae4534ae4 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -715,7 +715,8 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data) * the origin might be already removed. For these reasons, * passing missing_ok = true. */ - ReplicationOriginNameForTablesync(sub->oid, relid, originname); + ReplicationOriginNameForTablesync(sub->oid, relid, originname, + sizeof(originname)); replorigin_drop_by_name(originname, true, false); } @@ -749,7 +750,8 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data) * dropped slots and fail. For these reasons, we allow * missing_ok = true for the drop. */ - ReplicationSlotNameForTablesync(sub->oid, sub_remove_rels[off].relid, syncslotname); + ReplicationSlotNameForTablesync(sub->oid, sub_remove_rels[off].relid, + syncslotname, sizeof(syncslotname)); ReplicationSlotDropAtPubNode(wrconn, syncslotname, true); } } @@ -1174,7 +1176,8 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) * worker so passing missing_ok = true. This can happen for the states * before SUBREL_STATE_FINISHEDCOPY. */ - ReplicationOriginNameForTablesync(subid, relid, originname); + ReplicationOriginNameForTablesync(subid, relid, originname, + sizeof(originname)); replorigin_drop_by_name(originname, true, false); } @@ -1254,7 +1257,8 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) { char syncslotname[NAMEDATALEN] = {0}; - ReplicationSlotNameForTablesync(subid, relid, syncslotname); + ReplicationSlotNameForTablesync(subid, relid, syncslotname, + sizeof(syncslotname)); ReplicationSlotDropAtPubNode(wrconn, syncslotname, true); } } @@ -1532,7 +1536,8 @@ ReportSlotConnectionError(List *rstates, Oid subid, char *slotname, char *err) { char syncslotname[NAMEDATALEN] = {0}; - ReplicationSlotNameForTablesync(subid, relid, syncslotname); + ReplicationSlotNameForTablesync(subid, relid, syncslotname, + sizeof(syncslotname)); elog(WARNING, "could not drop tablesync replication slot \"%s\"", syncslotname); } |
