summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/streamutil.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-08-28 15:15:20 +0200
committerPeter Eisentraut <peter@eisentraut.org>2023-08-28 15:17:04 +0200
commit36e4419d1f1ef06bba58a28a870aaaa8de73bb46 (patch)
tree9884e1cad81ae0aab5e7aba9f6d9bf676b8a7a3f /src/bin/pg_basebackup/streamutil.c
parentbb9002257b2211c213ad5989446d83a61c6446d3 (diff)
Make error messages about WAL segment size more consistent
Make the primary messages more compact and make the detail messages uniform. In initdb.c and pg_resetwal.c, use the newish option_parse_int() to simplify some of the option parsing. For the backend GUC wal_segment_size, add a GUC check hook to do the verification instead of coding it in bootstrap.c. This might be overkill, but that way the check is in the right place and it becomes more self-documenting. In passing, make pg_controldata use the logging API for warning messages. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/flat/9939aa8a-d7be-da2c-7715-0a0b5535a1f7@eisentraut.org
Diffstat (limited to 'src/bin/pg_basebackup/streamutil.c')
-rw-r--r--src/bin/pg_basebackup/streamutil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index 15514599c4e..75ab9e56f3e 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -321,10 +321,11 @@ RetrieveWalSegSize(PGconn *conn)
if (!IsValidWalSegSize(WalSegSz))
{
- pg_log_error(ngettext("WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte",
- "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes",
+ pg_log_error(ngettext("remote server reported invalid WAL segment size (%d byte)",
+ "remote server reported invalid WAL segment size (%d bytes)",
WalSegSz),
WalSegSz);
+ pg_log_error_detail("The WAL segment size must be a power of two between 1 MB and 1 GB.");
return false;
}