At Fri, 16 Sep 2022 12:10:05 +1200, Thomas Munro <thomas.mu...@gmail.com> wrote in > On Wed, Sep 14, 2022 at 2:38 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > Kyotaro Horiguchi <horikyota....@gmail.com> writes: > > > I saw the following message recently modified. > > >> This controls the maximum distance we can read ahead in the WAL to > > >> prefetch referenced data blocks. > > > Maybe the "we" means "PostgreSQL program and you" but I see it > > > somewhat out of place. > > > > +1, I saw that today and thought it was outside our usual style. > > The whole thing is awfully verbose for a GUC description, too. > > Maybe > > > > "Maximum distance to read ahead in WAL to prefetch data blocks." > > +1 > > For "we", I must have been distracted by code comment style. For the > extra useless verbiage, it's common for GUC description to begin "This > control/affects/blah" like that, but I agree it's useless noise. > > For the other cases, Amit's suggestion of 'server' seems sensible to me.
Thaks for the opinion. I'm fine with that, too. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
>From 31df0a224d7d4d6cb619534f24940c4c3571cfd9 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi <horikyota....@gmail.com> Date: Fri, 16 Sep 2022 15:07:21 +0900 Subject: [PATCH v2] Get rid of "we" from messages It's not our usual style to use "we" in error messages. Get rid of that usages so that the messages sound usual. On the way fixing them, simplify a verbose message. --- src/backend/replication/pgoutput/pgoutput.c | 4 ++-- src/backend/storage/file/fd.c | 2 +- src/backend/utils/misc/guc_tables.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index 62e0ffecd8..9c8faece10 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -441,13 +441,13 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, if (data->protocol_version > LOGICALREP_PROTO_MAX_VERSION_NUM) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("client sent proto_version=%d but we only support protocol %d or lower", + errmsg("client sent proto_version=%d but server only supports protocol %d or lower", data->protocol_version, LOGICALREP_PROTO_MAX_VERSION_NUM))); if (data->protocol_version < LOGICALREP_PROTO_MIN_VERSION_NUM) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("client sent proto_version=%d but we only support protocol %d or higher", + errmsg("client sent proto_version=%d but server only supports protocol %d or higher", data->protocol_version, LOGICALREP_PROTO_MIN_VERSION_NUM))); if (data->publication_names == NIL) diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 20c3741aa1..073dab2be5 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -978,7 +978,7 @@ set_max_safe_fds(void) ereport(FATAL, (errcode(ERRCODE_INSUFFICIENT_RESOURCES), errmsg("insufficient file descriptors available to start server process"), - errdetail("System allows %d, we need at least %d.", + errdetail("System allows %d, server needs at least %d.", max_safe_fds + NUM_RESERVED_FDS, FD_MINFREE + NUM_RESERVED_FDS))); diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 550e95056c..5c340d471d 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -2591,7 +2591,7 @@ struct config_int ConfigureNamesInt[] = { {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_RECOVERY, gettext_noop("Buffer size for reading ahead in the WAL during recovery."), - gettext_noop("This controls the maximum distance we can read ahead in the WAL to prefetch referenced data blocks."), + gettext_noop("Maximum distance to read ahead in WAL to prefetch data blocks."), GUC_UNIT_BYTE }, &wal_decode_buffer_size, -- 2.31.1