1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Improve the description of various GUCs

This commit fixes a couple of inconsistencies in the descriptions of
some GUCs, while making their wording more general regarding the units
they rely on.

For most of them, this removes the use of terms like "N seconds" or "N
bytes", which may not apply easily to all the languages these strings
are translated to (from my own experience, this works in French and
English, less in Japanese).

Per debate between the authors listed below.

Author: Justin Pryzby, Michael Paquier
Discussion: https://postgr.es/m/20211129030833.GJ17618@telsasoft.com
This commit is contained in:
Michael Paquier
2021-12-03 09:39:03 +09:00
parent 6051857fc9
commit 03774f9bb3

View File

@ -2133,8 +2133,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
{ {
{"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING, {"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Forces a switch to the next WAL file if a " gettext_noop("Sets the amount of time to wait before forcing a "
"new file has not been started within N seconds."), "switch to the next WAL file."),
NULL, NULL,
GUC_UNIT_S GUC_UNIT_S
}, },
@ -2144,7 +2144,8 @@ static struct config_int ConfigureNamesInt[] =
}, },
{ {
{"post_auth_delay", PGC_BACKEND, DEVELOPER_OPTIONS, {"post_auth_delay", PGC_BACKEND, DEVELOPER_OPTIONS,
gettext_noop("Waits N seconds on connection startup after authentication."), gettext_noop("Sets the amount of time to wait after "
"authentication on connection startup."),
gettext_noop("This allows attaching a debugger to the process."), gettext_noop("This allows attaching a debugger to the process."),
GUC_NOT_IN_SAMPLE | GUC_UNIT_S GUC_NOT_IN_SAMPLE | GUC_UNIT_S
}, },
@ -2764,7 +2765,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
/* Not for general use */ /* Not for general use */
{"pre_auth_delay", PGC_SIGHUP, DEVELOPER_OPTIONS, {"pre_auth_delay", PGC_SIGHUP, DEVELOPER_OPTIONS,
gettext_noop("Waits N seconds on connection startup before authentication."), gettext_noop("Sets the amount of time to wait before "
"authentication on connection startup."),
gettext_noop("This allows attaching a debugger to the process."), gettext_noop("This allows attaching a debugger to the process."),
GUC_NOT_IN_SAMPLE | GUC_UNIT_S GUC_NOT_IN_SAMPLE | GUC_UNIT_S
}, },
@ -2821,11 +2823,12 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS, {"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS,
gettext_noop("Enables warnings if checkpoint segments are filled more " gettext_noop("Sets the maximum time before warning if checkpoints "
"frequently than this."), "triggered by WAL volume happen too frequently."),
gettext_noop("Write a message to the server log if checkpoints " gettext_noop("Write a message to the server log if checkpoints "
"caused by the filling of checkpoint segment files happens more " "caused by the filling of WAL segment files happen more "
"frequently than this number of seconds. Zero turns off the warning."), "frequently than this amount of time. "
"Zero turns off the warning."),
GUC_UNIT_S GUC_UNIT_S
}, },
&CheckPointWarning, &CheckPointWarning,
@ -3008,7 +3011,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"log_parameter_max_length", PGC_SUSET, LOGGING_WHAT, {"log_parameter_max_length", PGC_SUSET, LOGGING_WHAT,
gettext_noop("When logging statements, limit logged parameter values to first N bytes."), gettext_noop("Sets the maximum length in bytes of data logged for bind "
"parameter values when logging statements."),
gettext_noop("-1 to print values in full."), gettext_noop("-1 to print values in full."),
GUC_UNIT_BYTE GUC_UNIT_BYTE
}, },
@ -3019,7 +3023,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"log_parameter_max_length_on_error", PGC_USERSET, LOGGING_WHAT, {"log_parameter_max_length_on_error", PGC_USERSET, LOGGING_WHAT,
gettext_noop("When reporting an error, limit logged parameter values to first N bytes."), gettext_noop("Sets the maximum length in bytes of data logged for bind "
"parameter values when logging statements, on error."),
gettext_noop("-1 to print values in full."), gettext_noop("-1 to print values in full."),
GUC_UNIT_BYTE GUC_UNIT_BYTE
}, },
@ -3145,7 +3150,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"log_rotation_age", PGC_SIGHUP, LOGGING_WHERE, {"log_rotation_age", PGC_SIGHUP, LOGGING_WHERE,
gettext_noop("Automatic log file rotation will occur after N minutes."), gettext_noop("Sets the amount of time to wait before forcing "
"log file rotation."),
NULL, NULL,
GUC_UNIT_MIN GUC_UNIT_MIN
}, },
@ -3156,7 +3162,8 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"log_rotation_size", PGC_SIGHUP, LOGGING_WHERE, {"log_rotation_size", PGC_SIGHUP, LOGGING_WHERE,
gettext_noop("Automatic log file rotation will occur after N kilobytes."), gettext_noop("Sets the maximum size a log file can reach before "
"being rotated."),
NULL, NULL,
GUC_UNIT_KB GUC_UNIT_KB
}, },