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
This commit is contained in:
parent
1b9050da66
commit
ba8321349b
@ -364,7 +364,7 @@ restart:
|
|||||||
if (nowait)
|
if (nowait)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OBJECT_IN_USE),
|
(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->roident,
|
||||||
state->acquired_by)));
|
state->acquired_by)));
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ restart:
|
|||||||
*/
|
*/
|
||||||
tuple = SearchSysCache1(REPLORIGIDENT, ObjectIdGetDatum(roident));
|
tuple = SearchSysCache1(REPLORIGIDENT, ObjectIdGetDatum(roident));
|
||||||
if (!HeapTupleIsValid(tuple))
|
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);
|
roident);
|
||||||
|
|
||||||
CatalogTupleDelete(rel, &tuple->t_self);
|
CatalogTupleDelete(rel, &tuple->t_self);
|
||||||
@ -485,7 +485,7 @@ replorigin_by_oid(RepOriginId roident, bool missing_ok, char **roname)
|
|||||||
if (!missing_ok)
|
if (!missing_ok)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||||
errmsg("replication origin with ID %u does not exist",
|
errmsg("replication origin with ID %d does not exist",
|
||||||
roident)));
|
roident)));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -799,7 +799,7 @@ StartupReplicationOrigin(void)
|
|||||||
last_state++;
|
last_state++;
|
||||||
|
|
||||||
ereport(LOG,
|
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,
|
disk_state.roident,
|
||||||
LSN_FORMAT_ARGS(disk_state.remote_lsn))));
|
LSN_FORMAT_ARGS(disk_state.remote_lsn))));
|
||||||
}
|
}
|
||||||
@ -937,7 +937,7 @@ replorigin_advance(RepOriginId node,
|
|||||||
{
|
{
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OBJECT_IN_USE),
|
(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->roident,
|
||||||
replication_state->acquired_by)));
|
replication_state->acquired_by)));
|
||||||
}
|
}
|
||||||
@ -948,7 +948,7 @@ replorigin_advance(RepOriginId node,
|
|||||||
if (replication_state == NULL && free_state == NULL)
|
if (replication_state == NULL && free_state == NULL)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
(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),
|
node),
|
||||||
errhint("Increase max_replication_slots and try again.")));
|
errhint("Increase max_replication_slots and try again.")));
|
||||||
|
|
||||||
@ -1126,7 +1126,7 @@ replorigin_session_setup(RepOriginId node)
|
|||||||
{
|
{
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OBJECT_IN_USE),
|
(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)));
|
curstate->roident, curstate->acquired_by)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1138,7 +1138,7 @@ replorigin_session_setup(RepOriginId node)
|
|||||||
if (session_replication_state == NULL && free_slot == -1)
|
if (session_replication_state == NULL && free_slot == -1)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
|
(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),
|
node),
|
||||||
errhint("Increase max_replication_slots and try again.")));
|
errhint("Increase max_replication_slots and try again.")));
|
||||||
else if (session_replication_state == NULL)
|
else if (session_replication_state == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user