pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make error messages about WAL segment size more consistent
Date: Mon, 28 Aug 2023 13:25:23 +0000
Message-ID: <E1qacF8-001Lin-Od@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/36e4419d1f1ef06bba58a28a870aaaa8de73bb46

Modified Files
--------------
src/backend/access/transam/xlog.c              | 19 ++++++++++++++++---
src/backend/bootstrap/bootstrap.c              | 11 +----------
src/backend/utils/misc/guc_tables.c            |  2 +-
src/bin/initdb/initdb.c                        | 25 ++++++-------------------
src/bin/pg_basebackup/streamutil.c             |  5 +++--
src/bin/pg_controldata/pg_controldata.c        | 23 +++++++++++------------
src/bin/pg_controldata/t/001_pg_controldata.pl |  6 +++---
src/bin/pg_resetwal/Makefile                   |  2 ++
src/bin/pg_resetwal/pg_resetwal.c              | 18 +++++++++++-------
src/bin/pg_rewind/pg_rewind.c                  | 12 ++++++++----
src/bin/pg_waldump/pg_waldump.c                | 12 ++++++++----
src/include/utils/guc_hooks.h                  |  1 +
12 files changed, 71 insertions(+), 65 deletions(-)



Message-ID: <E1qacF8-001Lin-Od@gemulon.postgresql.org>
Permalink:  ../E1qacF8-001Lin-Od@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qacF8-001Lin-Od@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make error messages about WAL segment size more consistent
  In-Reply-To: <E1qacF8-001Lin-Od@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox