Skip to content

Commit 6787e53

Browse files
committed
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.
1 parent fc0fefb commit 6787e53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_upgrade/check.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
600600
PATH_SEPARATOR);
601601

602602
for (dbnum = 0; dbnum < old_cluster.dbarr.ndbs; dbnum++)
603-
fprintf(script, RMDIR_CMD " %c%s%c%d%c\n", PATH_QUOTE,
603+
fprintf(script, RMDIR_CMD " %c%s%c%u%c\n", PATH_QUOTE,
604604
fix_path_separator(os_info.old_tablespaces[tblnum]),
605605
PATH_SEPARATOR, old_cluster.dbarr.dbs[dbnum].db_oid,
606606
PATH_QUOTE);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy