aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2022-08-23 09:55:05 +0700
committerPeter Eisentraut <peter@eisentraut.org>2022-08-28 16:04:35 +0200
commit73cbdb7f1944b2ad847fb62d71011b96cd96c8fd (patch)
tree59ed223b59e93a938b2727d7f77dbfc734f91ae6 /src
parent44817d97bca361f2be7fac64afa50715f959c11c (diff)
downloadpostgresql-73cbdb7f1944b2ad847fb62d71011b96cd96c8fd.tar.gz
postgresql-73cbdb7f1944b2ad847fb62d71011b96cd96c8fd.zip
Switch format specifier for replication origins to %d
Using %u with uint16 causes warnings with -Wformat-signedness. There are many other warnings, but for now change only these since c920fe4818 already changed the message string for most of them. Per report from Peter Eisentraut Discussion: https://www.postgresql.org/message-id/31e63649-0355-7088-831e-b07d5f908a8c%40enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/origin.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index d1e9b0b6eff..9b0774ee3e6 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -352,7 +352,7 @@ restart:
if (nowait)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_IN_USE),
- errmsg("could not drop replication origin with ID %u, in use by PID %d",
+ errmsg("could not drop replication origin with ID %d, in use by PID %d",
state->roident,
state->acquired_by)));
@@ -396,7 +396,7 @@ restart:
*/
tuple = SearchSysCache1(REPLORIGIDENT, ObjectIdGetDatum(roident));
if (!HeapTupleIsValid(tuple))
- elog(ERROR, "cache lookup failed for replication origin with ID %u",
+ elog(ERROR, "cache lookup failed for replication origin with ID %d",
roident);
CatalogTupleDelete(rel, &tuple->t_self);
@@ -473,7 +473,7 @@ replorigin_by_oid(RepOriginId roident, bool missing_ok, char **roname)
if (!missing_ok)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("replication origin with ID %u does not exist",
+ errmsg("replication origin with ID %d does not exist",
roident)));
return false;
@@ -787,7 +787,7 @@ StartupReplicationOrigin(void)
last_state++;
ereport(LOG,
- (errmsg("recovered replication state of node %u to %X/%X",
+ (errmsg("recovered replication state of node %d to %X/%X",
disk_state.roident,
LSN_FORMAT_ARGS(disk_state.remote_lsn))));
}
@@ -925,7 +925,7 @@ replorigin_advance(RepOriginId node,
{
ereport(ERROR,
(errcode(ERRCODE_OBJECT_IN_USE),
- errmsg("replication origin with ID %u is already active for PID %d",
+ errmsg("replication origin with ID %d is already active for PID %d",
replication_state->roident,
replication_state->acquired_by)));
}
@@ -936,7 +936,7 @@ replorigin_advance(RepOriginId node,
if (replication_state == NULL && free_state == NULL)
ereport(ERROR,
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("could not find free replication state slot for replication origin with ID %u",
+ errmsg("could not find free replication state slot for replication origin with ID %d",
node),
errhint("Increase max_replication_slots and try again.")));
@@ -1114,7 +1114,7 @@ replorigin_session_setup(RepOriginId node)
{
ereport(ERROR,
(errcode(ERRCODE_OBJECT_IN_USE),
- errmsg("replication origin with ID %u is already active for PID %d",
+ errmsg("replication origin with ID %d is already active for PID %d",
curstate->roident, curstate->acquired_by)));
}
@@ -1126,7 +1126,7 @@ replorigin_session_setup(RepOriginId node)
if (session_replication_state == NULL && free_slot == -1)
ereport(ERROR,
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("could not find free replication state slot for replication origin with ID %u",
+ errmsg("could not find free replication state slot for replication origin with ID %d",
node),
errhint("Increase max_replication_slots and try again.")));
else if (session_replication_state == NULL)