1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

pg_upgrade: Print OID using %u instead of %d

This could write wrong output into the cluster deletion script if a
database OID exceeds the signed 32-bit range.
This commit is contained in:
Peter Eisentraut
2021-04-12 20:29:24 +02:00
parent fc0fefbfe0
commit 6787e53fe5

View File

@ -600,7 +600,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
PATH_SEPARATOR);
for (dbnum = 0; dbnum < old_cluster.dbarr.ndbs; dbnum++)
fprintf(script, RMDIR_CMD " %c%s%c%d%c\n", PATH_QUOTE,
fprintf(script, RMDIR_CMD " %c%s%c%u%c\n", PATH_QUOTE,
fix_path_separator(os_info.old_tablespaces[tblnum]),
PATH_SEPARATOR, old_cluster.dbarr.dbs[dbnum].db_oid,
PATH_QUOTE);