pg_basebackup: Correct type of WalSegSz
authorPeter Eisentraut <[email protected]>
Mon, 3 Apr 2023 05:13:52 +0000 (07:13 +0200)
committerPeter Eisentraut <[email protected]>
Mon, 3 Apr 2023 05:21:06 +0000 (07:21 +0200)
The pg_basebackup code had WalSegSz as uint32, whereas the rest of the
code has it as int.  This seems confusing, and using the extra range
wouldn't actually work.

Reviewed-by: Daniel Gustafsson <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/1bf15c7a-0acd-1864-081e-7a28814310fe%40enterprisedb.com

src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/streamutil.h

index e7618f46172cf6ed8460db6e5ae906f06a9f9938..15514599c4ef3571429d7d9f6e1981fde2d48548 100644 (file)
@@ -31,7 +31,7 @@
 
 #define ERRCODE_DUPLICATE_OBJECT  "42710"
 
-uint32     WalSegSz;
+int            WalSegSz;
 
 static bool RetrieveDataDirCreatePerm(PGconn *conn);
 
index 04ceb3097199f4f85198ae6de24ca2fafb816faf..268c163213c245caadbb1d96aa90c723d6997d35 100644 (file)
@@ -24,7 +24,7 @@ extern char *dbuser;
 extern char *dbport;
 extern char *dbname;
 extern int dbgetpassword;
-extern uint32 WalSegSz;
+extern int WalSegSz;
 
 /* Connection kept global so we can disconnect easily */
 extern PGconn *conn;