Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita932824

Browse files
author
Amit Kapila
committed
Pass Size as a 2nd argument for snprintf() in tablesync.c.
Previously the following snprintf() wrappers:* ReplicationSlotNameForTablesync()* ReplicationOriginNameForTablesync()... used int as a second argument of snprintf() while the actual type of itis size_t. Although it doesn't fail at present better replace it with Sizefor consistency with the rest of the system.Author: Aleksander AlekseevReviewed-By: Peter SmithDiscussion:https://postgr.es/m/CAHut%2BPsa8hhfSE6ozUK-ih7GkQziAVAf4f3bqiXEj2nQiu-43g%40mail.gmail.com
1 parent6971a83 commita932824

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎src/backend/replication/logical/tablesync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ copy_table(Relation rel)
11871187
*/
11881188
void
11891189
ReplicationSlotNameForTablesync(Oidsuboid,Oidrelid,
1190-
char*syncslotname,intszslot)
1190+
char*syncslotname,Sizeszslot)
11911191
{
11921192
snprintf(syncslotname,szslot,"pg_%u_sync_%u_"UINT64_FORMAT,suboid,
11931193
relid,GetSystemIdentifier());
@@ -1200,7 +1200,7 @@ ReplicationSlotNameForTablesync(Oid suboid, Oid relid,
12001200
*/
12011201
void
12021202
ReplicationOriginNameForTablesync(Oidsuboid,Oidrelid,
1203-
char*originname,intszorgname)
1203+
char*originname,Sizeszorgname)
12041204
{
12051205
snprintf(originname,szorgname,"pg_%u_%u",suboid,relid);
12061206
}

‎src/include/replication/slot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ extern void ReplicationSlotsDropDBSlots(Oid dboid);
218218
externboolInvalidateObsoleteReplicationSlots(XLogSegNooldestSegno);
219219
externReplicationSlot*SearchNamedReplicationSlot(constchar*name,boolneed_lock);
220220
externintReplicationSlotIndex(ReplicationSlot*slot);
221-
externvoidReplicationSlotNameForTablesync(Oidsuboid,Oidrelid,char*syncslotname,intszslot);
221+
externvoidReplicationSlotNameForTablesync(Oidsuboid,Oidrelid,char*syncslotname,Sizeszslot);
222222
externvoidReplicationSlotDropAtPubNode(WalReceiverConn*wrconn,char*slotname,boolmissing_ok);
223223

224224
externvoidStartupReplicationSlots(void);

‎src/include/replication/worker_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ extern void logicalrep_worker_wakeup_ptr(LogicalRepWorker *worker);
9393
externintlogicalrep_sync_worker_count(Oidsubid);
9494

9595
externvoidReplicationOriginNameForTablesync(Oidsuboid,Oidrelid,
96-
char*originname,intszorgname);
96+
char*originname,Sizeszorgname);
9797
externchar*LogicalRepSyncTableStart(XLogRecPtr*origin_startpos);
9898

9999
externboolAllTablesyncsReady(void);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp