Commit 6787e53f authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent fc0fefbf
...@@ -600,7 +600,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name) ...@@ -600,7 +600,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
PATH_SEPARATOR); PATH_SEPARATOR);
for (dbnum = 0; dbnum < old_cluster.dbarr.ndbs; dbnum++) 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]), fix_path_separator(os_info.old_tablespaces[tblnum]),
PATH_SEPARATOR, old_cluster.dbarr.dbs[dbnum].db_oid, PATH_SEPARATOR, old_cluster.dbarr.dbs[dbnum].db_oid,
PATH_QUOTE); PATH_QUOTE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment