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

Commit73cbdb7

Browse files
j-naylorpetere
authored andcommitted
Switch format specifier for replication origins to %d
Using %u with uint16 causes warnings with -Wformat-signedness. There are manyother warnings, but for now change only these sincec920fe4 already changedthe message string for most of them.Per report from Peter EisentrautDiscussion:https://www.postgresql.org/message-id/31e63649-0355-7088-831e-b07d5f908a8c%40enterprisedb.com
1 parent44817d9 commit73cbdb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ replorigin_drop_guts(Relation rel, RepOriginId roident, bool nowait)
352352
if (nowait)
353353
ereport(ERROR,
354354
(errcode(ERRCODE_OBJECT_IN_USE),
355-
errmsg("could not drop replication origin with ID %u, in use by PID %d",
355+
errmsg("could not drop replication origin with ID %d, in use by PID %d",
356356
state->roident,
357357
state->acquired_by)));
358358

@@ -396,7 +396,7 @@ replorigin_drop_guts(Relation rel, RepOriginId roident, bool nowait)
396396
*/
397397
tuple=SearchSysCache1(REPLORIGIDENT,ObjectIdGetDatum(roident));
398398
if (!HeapTupleIsValid(tuple))
399-
elog(ERROR,"cache lookup failed for replication origin with ID %u",
399+
elog(ERROR,"cache lookup failed for replication origin with ID %d",
400400
roident);
401401

402402
CatalogTupleDelete(rel,&tuple->t_self);
@@ -473,7 +473,7 @@ replorigin_by_oid(RepOriginId roident, bool missing_ok, char **roname)
473473
if (!missing_ok)
474474
ereport(ERROR,
475475
(errcode(ERRCODE_UNDEFINED_OBJECT),
476-
errmsg("replication origin with ID %u does not exist",
476+
errmsg("replication origin with ID %d does not exist",
477477
roident)));
478478

479479
return false;
@@ -787,7 +787,7 @@ StartupReplicationOrigin(void)
787787
last_state++;
788788

789789
ereport(LOG,
790-
(errmsg("recovered replication state of node %u to %X/%X",
790+
(errmsg("recovered replication state of node %d to %X/%X",
791791
disk_state.roident,
792792
LSN_FORMAT_ARGS(disk_state.remote_lsn))));
793793
}
@@ -925,7 +925,7 @@ replorigin_advance(RepOriginId node,
925925
{
926926
ereport(ERROR,
927927
(errcode(ERRCODE_OBJECT_IN_USE),
928-
errmsg("replication origin with ID %u is already active for PID %d",
928+
errmsg("replication origin with ID %d is already active for PID %d",
929929
replication_state->roident,
930930
replication_state->acquired_by)));
931931
}
@@ -936,7 +936,7 @@ replorigin_advance(RepOriginId node,
936936
if (replication_state==NULL&&free_state==NULL)
937937
ereport(ERROR,
938938
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
939-
errmsg("could not find free replication state slot for replication origin with ID %u",
939+
errmsg("could not find free replication state slot for replication origin with ID %d",
940940
node),
941941
errhint("Increase max_replication_slots and try again.")));
942942

@@ -1114,7 +1114,7 @@ replorigin_session_setup(RepOriginId node)
11141114
{
11151115
ereport(ERROR,
11161116
(errcode(ERRCODE_OBJECT_IN_USE),
1117-
errmsg("replication origin with ID %u is already active for PID %d",
1117+
errmsg("replication origin with ID %d is already active for PID %d",
11181118
curstate->roident,curstate->acquired_by)));
11191119
}
11201120

@@ -1126,7 +1126,7 @@ replorigin_session_setup(RepOriginId node)
11261126
if (session_replication_state==NULL&&free_slot==-1)
11271127
ereport(ERROR,
11281128
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
1129-
errmsg("could not find free replication state slot for replication origin with ID %u",
1129+
errmsg("could not find free replication state slot for replication origin with ID %d",
11301130
node),
11311131
errhint("Increase max_replication_slots and try again.")));
11321132
elseif (session_replication_state==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp