pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #16997: parameter server_encoding's category problem 7+ messages / 3 participants [nested] [flat]
Commits from this thread: 2021-05-08 a55a98477b Sync guc.c and postgresql.conf.sample with the SGML docs.
* BUG #16997: parameter server_encoding's category problem @ 2021-05-07 06:31 PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 0 siblings, 1 reply; 7+ messages in thread From: PG Bug reporting form @ 2021-05-07 06:31 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org; +Cc: leiyanliang@highgo.com The following bug has been logged on the website: Bug reference: 16997 Logged by: yanliang lei Email address: leiyanliang@highgo.com PostgreSQL version: 13.1 Operating system: CentOS7.6 Description: In the following sql statement, parameter server_encoding's category is “Client Connection Defaults / Locale and Formatting”: postgres=# select category from pg_settings where name='server_encoding'; -[ RECORD 1 ]------------------------------------------------ category | Client Connection Defaults / Locale and Formatting postgres=# In the document https://www.postgresql.org/docs/current/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT, there is no entry about parameter server_encoding. and in the document https://www.postgresql.org/docs/current/runtime-config-preset.html,there is a entry about parameter server_encoding. so, What is the parameter server_encoding's category? ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> @ 2021-05-07 11:43 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 7+ messages in thread From: Bharath Rupireddy @ 2021-05-07 11:43 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org; +Cc: leiyanliang@highgo.com On Fri, May 7, 2021 at 3:11 PM PG Bug reporting form <noreply@postgresql.org> wrote: > > The following bug has been logged on the website: > > Bug reference: 16997 > Logged by: yanliang lei > Email address: leiyanliang@highgo.com > PostgreSQL version: 13.1 > Operating system: CentOS7.6 > Description: > > In the following sql statement, parameter server_encoding's category is > “Client Connection Defaults / Locale and Formatting”: > > postgres=# select category from pg_settings where name='server_encoding'; > -[ RECORD 1 ]------------------------------------------------ > category | Client Connection Defaults / Locale and Formatting > > postgres=# > > In the document > https://www.postgresql.org/docs/current/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT, > there is no entry about parameter server_encoding. > > and in the document > https://www.postgresql.org/docs/current/runtime-config-preset.html,there is > a entry about parameter server_encoding. > > so, What is the parameter server_encoding's category? Thanks for reporting. All the internal parameters that can't be set by the users are under the "Preset Options" category. Likewise, server_encoding, lc_collate and lc_ctype should also be listed under the "Preset Options" category, even though there is a "Client Connection Defaults / Locale and Formatting" category, which has user configurable parameters. For instance, since the in_hot_standby is an internal parameter, it is specified under the "Preset Options" even though there is a "Replication / Standby Servers" category which mentions all the user configurable parameters. Therefore, I would say that the documentation is correct but the code is not. Attached patch should fix this. While on this, I also adjusted some of the wordings for the other "Preset Options". With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com Attachments:^ permalink raw reply [nested|flat] 7+ messages in threadv1-0001-Move-server_encoding-server_encoding-lc_ctype-to-.patch (application/octet-stream, 3.4K) download
From eb4ccb150e813e1e995b24cd4efa111009a73c89 Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy <bharath.rupireddy@enterprisedb.com> Date: Fri, 7 May 2021 17:06:36 +0530 Subject: [PATCH v1] Move server_encoding,server_encoding,lc_ctype to Preset Options All the internal parameters that can't be set by the users are under the "Preset Options" category. Likewise, server_encoding, lc_collate and lc_ctype should also be listed under that category, even though there is a "Client Connection Defaults / Locale and Formatting" category, which is for user configurable parameters. For instance, since the in_hot_standby is an internal parameter it is specified under the "Preset Options" even though there is a "Replication / Standby Servers" category which only mentions all the user configurable parameters. While on this, descriptions for some of the "Preset Options" are reworded to be more meaningful. --- src/backend/utils/misc/guc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index f2c7c2486b..e6bdd53f44 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1869,7 +1869,7 @@ static struct config_bool ConfigureNamesBool[] = { {"integer_datetimes", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Datetimes are integer based."), + gettext_noop("Shows whether PostgreSQL server was built with support for 64-bit-integer dates and times."), NULL, GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -2416,7 +2416,7 @@ static struct config_int ConfigureNamesInt[] = { {"data_directory_mode", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Mode of the data directory."), + gettext_noop("Shows the permissions of the data directory had at the PostgreSQL server startup."), gettext_noop("The parameter value is a numeric mode specification " "in the form accepted by the chmod and umask system " "calls. (To use the customary octal format the number " @@ -4102,7 +4102,7 @@ static struct config_string ConfigureNamesString[] = /* See main.c about why defaults for LC_foo are not all alike */ { - {"lc_collate", PGC_INTERNAL, CLIENT_CONN_LOCALE, + {"lc_collate", PGC_INTERNAL, PRESET_OPTIONS, gettext_noop("Shows the collation order locale."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE @@ -4113,7 +4113,7 @@ static struct config_string ConfigureNamesString[] = }, { - {"lc_ctype", PGC_INTERNAL, CLIENT_CONN_LOCALE, + {"lc_ctype", PGC_INTERNAL, PRESET_OPTIONS, gettext_noop("Shows the character classification and case conversion locale."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE @@ -4209,8 +4209,8 @@ static struct config_string ConfigureNamesString[] = { /* Can't be set in postgresql.conf */ - {"server_encoding", PGC_INTERNAL, CLIENT_CONN_LOCALE, - gettext_noop("Sets the server (database) character set encoding."), + {"server_encoding", PGC_INTERNAL, PRESET_OPTIONS, + gettext_noop("Shows the PostgreSQL server character set encoding."), NULL, GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -4429,7 +4429,7 @@ static struct config_string ConfigureNamesString[] = { {"ssl_library", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Name of the SSL library."), + gettext_noop("Shows the name of the SSL library that this PostgreSQL server was built with."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, -- 2.25.1
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> @ 2021-05-07 20:58 ` Tom Lane <tgl@sss.pgh.pa.us> 2021-05-08 08:33 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 0 siblings, 1 reply; 7+ messages in thread From: Tom Lane @ 2021-05-07 20:58 UTC (permalink / raw) To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org; leiyanliang@highgo.com Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes: > Thanks for reporting. All the internal parameters that can't be set by > the users are under the "Preset Options" category. Likewise, > server_encoding, lc_collate and lc_ctype should also be listed under > the "Preset Options" category, even though there is a "Client > Connection Defaults / Locale and Formatting" category, which has user > configurable parameters. For instance, since the in_hot_standby is an > internal parameter, it is specified under the "Preset Options" even > though there is a "Replication / Standby Servers" category which > mentions all the user configurable parameters. > Therefore, I would say that the documentation is correct but the code > is not. Attached patch should fix this. Hm. I did some more careful checks (by comparing the pg_settings view's output to the SGML docs) and found a boatload of additional misclassifications. The most egregious being that somebody had decided to invent a new sub-heading Write Ahead Log / Recovery, but didn't bother to add a corresponding enum value; so the variables in that sub-section were all misclassified (and not even all in the same way). I also discovered that postgresql.conf.sample wasn't all that well in sync with the docs. It mostly agreed with the docs as to classifications, but the ordering of individual options didn't agree so well. I think this is a consequence of various people having arbitrarily alphabetized the doc entries without making postgresql.conf.sample match. I can see no excuse for them not to match, though. Using the same assumption that the docs represent our best ideas in this area, the attached 0001 makes the GUC code and the sample file agree with the docs. I also think we should do 0002, which removes the group-level enum values for those categories where we have sub-categories. The group-level enum values seem to me to just be an attractive bug-encouraging nuisance (there is indeed one place in 0001 that changes a GUC that was misclassified at the top level). Plus they result in translators having to do extra work. There are a couple of loose ends yet: * I notice that these GUCs appear in the view, but if they're documented anywhere it's not in config.sgml: transaction_deferrable | Client Connection Defaults / Statement Behavior transaction_isolation | Client Connection Defaults / Statement Behavior transaction_read_only | Client Connection Defaults / Statement Behavior Should we add entries for them? If not, should we maybe move them to the UNGROUPED category (and then make them GUC_NO_SHOW_ALL), like other special GUCs such as "role"? I'm a bit inclined to the latter, since they aren't supposed to be used in the same way as ordinary GUCs. * The code's names for the categories do not match up all that well with the section headings in config.sgml, eg we have Query Tuning in guc.c and Query Planning in the docs. Should we try to sync that? > While on this, I also adjusted some of the wordings for the other > "Preset Options". I agree that the preset options should uniformly use the phrasing "Shows ...", but I thought your proposals here were mostly too verbose. regards, tom lane Attachments: download all (2 files, .tar.gz)0001-sync-guc-code-with-docs.patch (text/x-diff, 16.7K) download
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index f2c7c2486b..5c923f2141 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -733,6 +733,8 @@ const char *const config_group_names[] = gettext_noop("Write-Ahead Log / Checkpoints"), /* WAL_ARCHIVING */ gettext_noop("Write-Ahead Log / Archiving"), + /* WAL_RECOVERY */ + gettext_noop("Write-Ahead Log / Recovery"), /* WAL_ARCHIVE_RECOVERY */ gettext_noop("Write-Ahead Log / Archive Recovery"), /* WAL_RECOVERY_TARGET */ @@ -766,7 +768,7 @@ const char *const config_group_names[] = /* LOGGING_WHAT */ gettext_noop("Reporting and Logging / What to Log"), /* PROCESS_TITLE */ - gettext_noop("Process Title"), + gettext_noop("Reporting and Logging / Process Title"), /* STATS */ gettext_noop("Statistics"), /* STATS_MONITORING */ @@ -1188,7 +1190,7 @@ static struct config_bool ConfigureNamesBool[] = check_bonjour, NULL, NULL }, { - {"track_commit_timestamp", PGC_POSTMASTER, REPLICATION, + {"track_commit_timestamp", PGC_POSTMASTER, REPLICATION_SENDING, gettext_noop("Collects transaction commit time."), NULL }, @@ -1297,7 +1299,7 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { - {"recovery_prefetch", PGC_SIGHUP, WAL_SETTINGS, + {"recovery_prefetch", PGC_SIGHUP, WAL_RECOVERY, gettext_noop("Prefetch referenced blocks during recovery."), gettext_noop("Read ahead of the current replay position to find uncached blocks.") }, @@ -1306,7 +1308,7 @@ static struct config_bool ConfigureNamesBool[] = NULL, assign_recovery_prefetch, NULL }, { - {"recovery_prefetch_fpw", PGC_SIGHUP, WAL_SETTINGS, + {"recovery_prefetch_fpw", PGC_SIGHUP, WAL_RECOVERY, gettext_noop("Prefetch blocks that have full page images in the WAL."), gettext_noop("On some systems, there is no benefit to prefetching pages that will be " "entirely overwritten, but if the logical page size of the filesystem is " @@ -1869,7 +1871,7 @@ static struct config_bool ConfigureNamesBool[] = { {"integer_datetimes", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Datetimes are integer based."), + gettext_noop("Shows whether datetimes are integer based."), NULL, GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -2416,7 +2418,7 @@ static struct config_int ConfigureNamesInt[] = { {"data_directory_mode", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Mode of the data directory."), + gettext_noop("Shows the mode of the data directory."), gettext_noop("The parameter value is a numeric mode specification " "in the form accepted by the chmod and umask system " "calls. (To use the customary octal format the number " @@ -2772,7 +2774,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_ARCHIVE_RECOVERY, + {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_RECOVERY, gettext_noop("Maximum 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 blocks."), GUC_UNIT_BYTE @@ -3393,7 +3395,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER, + {"tcp_keepalives_idle", PGC_USERSET, CONN_AUTH_SETTINGS, gettext_noop("Time between issuing TCP keepalives."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S @@ -3404,7 +3406,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER, + {"tcp_keepalives_interval", PGC_USERSET, CONN_AUTH_SETTINGS, gettext_noop("Time between TCP keepalive retransmits."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S @@ -3426,7 +3428,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"tcp_keepalives_count", PGC_USERSET, CLIENT_CONN_OTHER, + {"tcp_keepalives_count", PGC_USERSET, CONN_AUTH_SETTINGS, gettext_noop("Maximum number of TCP keepalive retransmits."), gettext_noop("This controls the number of consecutive keepalive retransmits that can be " "lost before a connection is considered dead. A value of 0 uses the " @@ -3506,7 +3508,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"track_activity_query_size", PGC_POSTMASTER, RESOURCES_MEM, + {"track_activity_query_size", PGC_POSTMASTER, STATS_COLLECTOR, gettext_noop("Sets the size reserved for pg_stat_activity.query, in bytes."), NULL, GUC_UNIT_BYTE @@ -3528,7 +3530,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"tcp_user_timeout", PGC_USERSET, CLIENT_CONN_OTHER, + {"tcp_user_timeout", PGC_USERSET, CONN_AUTH_SETTINGS, gettext_noop("TCP user timeout."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_MS @@ -3573,7 +3575,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"client_connection_check_interval", PGC_USERSET, CLIENT_CONN_OTHER, + {"client_connection_check_interval", PGC_USERSET, CONN_AUTH_SETTINGS, gettext_noop("Sets the time interval between checks for disconnection while running queries."), NULL, GUC_UNIT_MS @@ -4102,7 +4104,7 @@ static struct config_string ConfigureNamesString[] = /* See main.c about why defaults for LC_foo are not all alike */ { - {"lc_collate", PGC_INTERNAL, CLIENT_CONN_LOCALE, + {"lc_collate", PGC_INTERNAL, PRESET_OPTIONS, gettext_noop("Shows the collation order locale."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE @@ -4113,7 +4115,7 @@ static struct config_string ConfigureNamesString[] = }, { - {"lc_ctype", PGC_INTERNAL, CLIENT_CONN_LOCALE, + {"lc_ctype", PGC_INTERNAL, PRESET_OPTIONS, gettext_noop("Shows the character classification and case conversion locale."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE @@ -4209,8 +4211,8 @@ static struct config_string ConfigureNamesString[] = { /* Can't be set in postgresql.conf */ - {"server_encoding", PGC_INTERNAL, CLIENT_CONN_LOCALE, - gettext_noop("Sets the server (database) character set encoding."), + {"server_encoding", PGC_INTERNAL, PRESET_OPTIONS, + gettext_noop("Shows the server (database) character set encoding."), NULL, GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -4429,7 +4431,7 @@ static struct config_string ConfigureNamesString[] = { {"ssl_library", PGC_INTERNAL, PRESET_OPTIONS, - gettext_noop("Name of the SSL library."), + gettext_noop("Shows the name of the SSL library."), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 0f7f49b949..3307d3a635 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -85,6 +85,10 @@ #tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; # 0 selects the system default +#client_connection_check_interval = 0 # time between checks for client + # disconnection while running queries; + # 0 for never + # - Authentication - #authentication_timeout = 1min # 1s-600s @@ -178,17 +182,17 @@ # - Asynchronous Behavior - +#backend_flush_after = 0 # measured in pages, 0 disables #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching #maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching #max_worker_processes = 8 # (change requires restart) -#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers -#parallel_leader_participation = on +#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers #max_parallel_workers = 8 # maximum number of max_worker_processes that # can be used in parallel operations +#parallel_leader_participation = on #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate # (change requires restart) -#backend_flush_after = 0 # measured in pages, 0 disables #------------------------------------------------------------------------------ @@ -212,9 +216,9 @@ # fsync_writethrough # open_sync #full_page_writes = on # recover from partial page writes -#wal_compression = off # enable compression of full-page writes #wal_log_hints = off # also do full page writes of non-critical updates # (change requires restart) +#wal_compression = off # enable compression of full-page writes #wal_init_zero = on # zero-fill new WAL files #wal_recycle = on # recycle WAL files #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers @@ -229,17 +233,11 @@ # - Checkpoints - #checkpoint_timeout = 5min # range 30s-1d -#max_wal_size = 1GB -#min_wal_size = 80MB #checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 #checkpoint_flush_after = 0 # measured in pages, 0 disables #checkpoint_warning = 30s # 0 disables - -# - Prefetching during recovery - - -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching -#recovery_prefetch = off # prefetch pages referenced in the WAL? -#recovery_prefetch_fpw = off # even pages logged with full page? +#max_wal_size = 1GB +#min_wal_size = 80MB # - Archiving - @@ -252,6 +250,12 @@ #archive_timeout = 0 # force a logfile segment switch after this # number of seconds; 0 disables +# - Recovery - + +#recovery_prefetch = off # prefetch pages referenced in the WAL? +#recovery_prefetch_fpw = off # even pages logged with full page? +#wal_decode_buffer_size = 512kB # lookahead window used for prefetching + # - Archive Recovery - # These are only used in recovery mode. @@ -298,12 +302,11 @@ #max_wal_senders = 10 # max number of walsender processes # (change requires restart) +#max_replication_slots = 10 # max number of replication slots + # (change requires restart) #wal_keep_size = 0 # in megabytes; 0 disables #max_slot_wal_keep_size = -1 # in megabytes; -1 disables #wal_sender_timeout = 60s # in milliseconds; 0 disables - -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) #track_commit_timestamp = off # collect timestamp of transaction commit # (change requires restart) @@ -360,25 +363,26 @@ # - Planner Method Configuration - +#enable_async_append = on #enable_bitmapscan = on +#enable_gathermerge = on #enable_hashagg = on #enable_hashjoin = on +#enable_incremental_sort = on #enable_indexscan = on #enable_indexonlyscan = on #enable_material = on +#enable_resultcache = on #enable_mergejoin = on #enable_nestloop = on #enable_parallel_append = on +#enable_parallel_hash = on +#enable_partition_pruning = on +#enable_partitionwise_join = off +#enable_partitionwise_aggregate = off #enable_seqscan = on #enable_sort = on -#enable_incremental_sort = on -#enable_resultcache = on #enable_tidscan = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_async_append = on # - Planner Cost Constants - @@ -387,8 +391,11 @@ #cpu_tuple_cost = 0.01 # same scale as above #cpu_index_tuple_cost = 0.005 # same scale as above #cpu_operator_cost = 0.0025 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above #parallel_setup_cost = 1000.0 # same scale as above +#parallel_tuple_cost = 0.1 # same scale as above +#min_parallel_table_scan_size = 8MB +#min_parallel_index_scan_size = 512kB +#effective_cache_size = 4GB #jit_above_cost = 100000 # perform JIT compilation if available # and query more expensive than this; @@ -399,10 +406,6 @@ # query is more expensive than this; # -1 disables -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -#effective_cache_size = 4GB - # - Genetic Query Optimizer - #geqo = on @@ -419,9 +422,9 @@ #constraint_exclusion = partition # on, off, or partition #cursor_tuple_fraction = 0.1 # range 0.0-1.0 #from_collapse_limit = 8 +#jit = on # allow JIT compilation #join_collapse_limit = 8 # 1 disables collapsing of explicit # JOIN clauses -#jit = on # allow JIT compilation #plan_cache_mode = auto # auto, force_generic_plan or # force_custom_plan @@ -450,6 +453,11 @@ # can include strftime() escapes #log_file_mode = 0600 # creation mode for log files, # begin with 0 to use octal notation +#log_rotation_age = 1d # Automatic rotation of logfiles will + # happen after that time. 0 disables. +#log_rotation_size = 10MB # Automatic rotation of logfiles will + # happen after that much log output. + # 0 disables. #log_truncate_on_rotation = off # If on, an existing log file with the # same name as the new log file will be # truncated rather than appended to. @@ -458,11 +466,6 @@ # or size-driven rotation. Default is # off, meaning append to existing files # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. # These are relevant when logging to syslog: #syslog_facility = 'LOCAL0' @@ -470,7 +473,7 @@ #syslog_sequence_numbers = on #syslog_split_messages = on -# This is only relevant when logging to eventlog (win32): +# This is only relevant when logging to eventlog (Windows): # (change requires restart) #event_source = 'PostgreSQL' @@ -597,21 +600,21 @@ # - Query and Index Statistics Collector - #track_activities = on +#track_activity_query_size = 1024 # (change requires restart) #track_counts = on #track_io_timing = off #track_wal_io_timing = off #track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) #stats_temp_directory = 'pg_stat_tmp' # - Monitoring - #compute_query_id = off +#log_statement_stats = off #log_parser_stats = off #log_planner_stats = off #log_executor_stats = off -#log_statement_stats = off #------------------------------------------------------------------------------ @@ -665,11 +668,11 @@ # error #search_path = '"$user", public' # schema names #row_security = on +#default_table_access_method = 'heap' #default_tablespace = '' # a tablespace name, '' uses the default +#default_toast_compression = 'pglz' # 'pglz' or 'lz4' #temp_tablespaces = '' # a list of tablespace names, '' uses # only default tablespace -#default_table_access_method = 'heap' -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' #check_function_bodies = on #default_transaction_isolation = 'read committed' #default_transaction_read_only = off @@ -679,16 +682,15 @@ #lock_timeout = 0 # in milliseconds, 0 is disabled #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled #idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 #vacuum_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_freeze_table_age = 150000000 +#vacuum_freeze_min_age = 50000000 #vacuum_failsafe_age = 1600000000 +#vacuum_multixact_freeze_table_age = 150000000 +#vacuum_multixact_freeze_min_age = 5000000 #vacuum_multixact_failsafe_age = 1600000000 #bytea_output = 'hex' # hex, escape #xmlbinary = 'base64' #xmloption = 'content' -#gin_fuzzy_search_limit = 0 #gin_pending_list_limit = 4MB # - Locale and Formatting - @@ -720,18 +722,15 @@ # - Shared Library Preloading - -#shared_preload_libraries = '' # (change requires restart) #local_preload_libraries = '' #session_preload_libraries = '' +#shared_preload_libraries = '' # (change requires restart) #jit_provider = 'llvmjit' # JIT library to use # - Other Defaults - #dynamic_library_path = '$libdir' - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never +#gin_fuzzy_search_limit = 0 #------------------------------------------------------------------------------ # LOCK MANAGEMENT @@ -775,10 +774,10 @@ #restart_after_crash = on # reinitialize after backend crash? #remove_temp_files_after_crash = on # remove temporary files after # backend crash? -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) #data_sync_retry = off # retry or panic on failure to fsync # data? # (change requires restart) +#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) #------------------------------------------------------------------------------ diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index b9b5c1adda..297e8ddebd 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -69,6 +69,7 @@ enum config_group WAL_SETTINGS, WAL_CHECKPOINTS, WAL_ARCHIVING, + WAL_RECOVERY, WAL_ARCHIVE_RECOVERY, WAL_RECOVERY_TARGET, REPLICATION,^ permalink raw reply [nested|flat] 7+ messages in thread0002-remove-useless-group-categories.patch (text/x-diff, 4.3K) download
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 5c923f2141..9db40b134a 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -703,16 +703,12 @@ const char *const config_group_names[] = gettext_noop("Ungrouped"), /* FILE_LOCATIONS */ gettext_noop("File Locations"), - /* CONN_AUTH */ - gettext_noop("Connections and Authentication"), /* CONN_AUTH_SETTINGS */ gettext_noop("Connections and Authentication / Connection Settings"), /* CONN_AUTH_AUTH */ gettext_noop("Connections and Authentication / Authentication"), /* CONN_AUTH_SSL */ gettext_noop("Connections and Authentication / SSL"), - /* RESOURCES */ - gettext_noop("Resource Usage"), /* RESOURCES_MEM */ gettext_noop("Resource Usage / Memory"), /* RESOURCES_DISK */ @@ -725,8 +721,6 @@ const char *const config_group_names[] = gettext_noop("Resource Usage / Background Writer"), /* RESOURCES_ASYNCHRONOUS */ gettext_noop("Resource Usage / Asynchronous Behavior"), - /* WAL */ - gettext_noop("Write-Ahead Log"), /* WAL_SETTINGS */ gettext_noop("Write-Ahead Log / Settings"), /* WAL_CHECKPOINTS */ @@ -739,8 +733,6 @@ const char *const config_group_names[] = gettext_noop("Write-Ahead Log / Archive Recovery"), /* WAL_RECOVERY_TARGET */ gettext_noop("Write-Ahead Log / Recovery Target"), - /* REPLICATION */ - gettext_noop("Replication"), /* REPLICATION_SENDING */ gettext_noop("Replication / Sending Servers"), /* REPLICATION_PRIMARY */ @@ -749,8 +741,6 @@ const char *const config_group_names[] = gettext_noop("Replication / Standby Servers"), /* REPLICATION_SUBSCRIBERS */ gettext_noop("Replication / Subscribers"), - /* QUERY_TUNING */ - gettext_noop("Query Tuning"), /* QUERY_TUNING_METHOD */ gettext_noop("Query Tuning / Planner Method Configuration"), /* QUERY_TUNING_COST */ @@ -759,8 +749,6 @@ const char *const config_group_names[] = gettext_noop("Query Tuning / Genetic Query Optimizer"), /* QUERY_TUNING_OTHER */ gettext_noop("Query Tuning / Other Planner Options"), - /* LOGGING */ - gettext_noop("Reporting and Logging"), /* LOGGING_WHERE */ gettext_noop("Reporting and Logging / Where to Log"), /* LOGGING_WHEN */ @@ -769,16 +757,12 @@ const char *const config_group_names[] = gettext_noop("Reporting and Logging / What to Log"), /* PROCESS_TITLE */ gettext_noop("Reporting and Logging / Process Title"), - /* STATS */ - gettext_noop("Statistics"), /* STATS_MONITORING */ gettext_noop("Statistics / Monitoring"), /* STATS_COLLECTOR */ gettext_noop("Statistics / Query and Index Statistics Collector"), /* AUTOVACUUM */ gettext_noop("Autovacuum"), - /* CLIENT_CONN */ - gettext_noop("Client Connection Defaults"), /* CLIENT_CONN_STATEMENT */ gettext_noop("Client Connection Defaults / Statement Behavior"), /* CLIENT_CONN_LOCALE */ @@ -789,8 +773,6 @@ const char *const config_group_names[] = gettext_noop("Client Connection Defaults / Other Defaults"), /* LOCK_MANAGEMENT */ gettext_noop("Lock Management"), - /* COMPAT_OPTIONS */ - gettext_noop("Version and Platform Compatibility"), /* COMPAT_OPTIONS_PREVIOUS */ gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"), /* COMPAT_OPTIONS_CLIENT */ diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index 297e8ddebd..e23e98dddd 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -54,50 +54,41 @@ enum config_group { UNGROUPED, FILE_LOCATIONS, - CONN_AUTH, CONN_AUTH_SETTINGS, CONN_AUTH_AUTH, CONN_AUTH_SSL, - RESOURCES, RESOURCES_MEM, RESOURCES_DISK, RESOURCES_KERNEL, RESOURCES_VACUUM_DELAY, RESOURCES_BGWRITER, RESOURCES_ASYNCHRONOUS, - WAL, WAL_SETTINGS, WAL_CHECKPOINTS, WAL_ARCHIVING, WAL_RECOVERY, WAL_ARCHIVE_RECOVERY, WAL_RECOVERY_TARGET, - REPLICATION, REPLICATION_SENDING, REPLICATION_PRIMARY, REPLICATION_STANDBY, REPLICATION_SUBSCRIBERS, - QUERY_TUNING, QUERY_TUNING_METHOD, QUERY_TUNING_COST, QUERY_TUNING_GEQO, QUERY_TUNING_OTHER, - LOGGING, LOGGING_WHERE, LOGGING_WHEN, LOGGING_WHAT, PROCESS_TITLE, - STATS, STATS_MONITORING, STATS_COLLECTOR, AUTOVACUUM, - CLIENT_CONN, CLIENT_CONN_STATEMENT, CLIENT_CONN_LOCALE, CLIENT_CONN_PRELOAD, CLIENT_CONN_OTHER, LOCK_MANAGEMENT, - COMPAT_OPTIONS, COMPAT_OPTIONS_PREVIOUS, COMPAT_OPTIONS_CLIENT, ERROR_HANDLING_OPTIONS,
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> @ 2021-05-08 08:33 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-08 16:25 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 7+ messages in thread From: Bharath Rupireddy @ 2021-05-08 08:33 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org; leiyanliang@highgo.com On Sat, May 8, 2021 at 2:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > I also discovered that postgresql.conf.sample wasn't all that well > in sync with the docs. It mostly agreed with the docs as to > classifications, but the ordering of individual options didn't > agree so well. I think this is a consequence of various people > having arbitrarily alphabetized the doc entries without making > postgresql.conf.sample match. I can see no excuse for them not > to match, though. If the arrangement is to be in alphabetical order, then max_parallel_maintenance_workers should come before max_parallel_workers_per_gather. #max_worker_processes = 8 # (change requires restart) -#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers -#parallel_leader_participation = on +#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers Other changes look good to me. > Using the same assumption that the docs represent our best ideas > in this area, the attached 0001 makes the GUC code and the sample > file agree with the docs. +1 to have the code and the docs in sync. > I also think we should do 0002, which removes the group-level > enum values for those categories where we have sub-categories. > The group-level enum values seem to me to just be an attractive > bug-encouraging nuisance (there is indeed one place in 0001 that > changes a GUC that was misclassified at the top level). Plus > they result in translators having to do extra work. Yeah, removing the unused group level enums CONN_AUTH, RESOURCES, WAL, REPLICATION and so on makes sense, since all the related parameters are categorized under respective subcategories such as CONN_AUTH_XXX, RESOURCES_XXX, WAL_XXX, REPLICATION_XXX. If at all, any new parameters are added and if they don't fall in any of the subcategories, a new subcategory can be added. > There are a couple of loose ends yet: > > * I notice that these GUCs appear in the view, but if they're > documented anywhere it's not in config.sgml: > > transaction_deferrable | Client Connection Defaults / Statement Behavior > transaction_isolation | Client Connection Defaults / Statement Behavior > transaction_read_only | Client Connection Defaults / Statement Behavior > > Should we add entries for them? If not, should we maybe move them > to the UNGROUPED category (and then make them GUC_NO_SHOW_ALL), > like other special GUCs such as "role"? I'm a bit inclined to the > latter, since they aren't supposed to be used in the same way as > ordinary GUCs. It looks like we are using GUC_NO_SHOW_ALL for unused, deprecated, or the GUCs being used by other commands. Since the above 3 GUCs are being used by START TRANSACTION ISOLATION LEVEL command, it makes sense to make them GUC_NO_SHOW_ALL, but let's keep them under CLIENT_CONN_STATEMENT. Anyways, they will not show up in the pg_settings and in the docs. Also, it will be good if we can add comment before them in guc.c /* Not for general use --- used by START TRANSACTION ISOLATION LEVEL */ > * The code's names for the categories do not match up all that > well with the section headings in config.sgml, eg we have > Query Tuning in guc.c and Query Planning in the docs. Should we > try to sync that? Yeah, there are differences. (in guc.c, in docs) --> (Resource Usage, Resource Consumption), (Write-Ahead Log, Write Ahead Log), (Query Tuning, Query Planning), (Reporting and Logging, Error Reporting and Logging), (Statistics, Run-time Statistics), (Autovacuum, Automatic Vacuuming). I think we can change the docs to match the guc.c code wordings. Thoughts? > > While on this, I also adjusted some of the wordings for the other > > "Preset Options". > > I agree that the preset options should uniformly use the phrasing > "Shows ...", but I thought your proposals here were mostly too > verbose. Thanks! The changes in 0001 are fine to me. There is another thread at [1] that discusses cleaning up the unused enums or modifying the GUC categories. And, there are some bugs being raised for the inconsistency between what pg_settings show and what docs say. Therefore, the patches proposed here will fix all of the concerns. It looks like there are more changes needed for docs clean up and for making transaction_XXXX GUC_NO_SHOW_ALL, if agreed I can post separate patches for these things on top of 0001 and 0002. [1] - https://www.postgresql.org/message-id/flat/20210413123139.GE6091%40telsasoft.com With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 2021-05-08 08:33 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> @ 2021-05-08 16:25 ` Tom Lane <tgl@sss.pgh.pa.us> 2021-05-09 13:00 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 0 siblings, 1 reply; 7+ messages in thread From: Tom Lane @ 2021-05-08 16:25 UTC (permalink / raw) To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, leiyanliang@highgo.com, Justin Pryzby <pryzby@telsasoft.com> Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes: > On Sat, May 8, 2021 at 2:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I also discovered that postgresql.conf.sample wasn't all that well >> in sync with the docs. It mostly agreed with the docs as to >> classifications, but the ordering of individual options didn't >> agree so well. I think this is a consequence of various people >> having arbitrarily alphabetized the doc entries without making >> postgresql.conf.sample match. I can see no excuse for them not >> to match, though. > If the arrangement is to be in alphabetical order, then > max_parallel_maintenance_workers should come before > max_parallel_workers_per_gather. No, the idea is to have postgresql.conf.sample match what's in config.sgml, which is not at all alphabetical in that section. We regularly have religious wars over whether strict alphabetical order is the best way to present things. I'm generally in the camp that finds that to be overly pedantic, so I'm not in a hurry to change config.sgml here. I've pushed those patches with a bit of additional work on the comments around enum config_group. The other points remain to be dealt with: >> * I notice that these GUCs appear in the view, but if they're >> documented anywhere it's not in config.sgml: >> transaction_deferrable | Client Connection Defaults / Statement Behavior >> transaction_isolation | Client Connection Defaults / Statement Behavior >> transaction_read_only | Client Connection Defaults / Statement Behavior >> Should we add entries for them? If not, should we maybe move them >> to the UNGROUPED category (and then make them GUC_NO_SHOW_ALL), >> like other special GUCs such as "role"? I'm a bit inclined to the >> latter, since they aren't supposed to be used in the same way as >> ordinary GUCs. > It looks like we are using GUC_NO_SHOW_ALL for unused, deprecated, or > the GUCs being used by other commands. Since the above 3 GUCs are > being used by START TRANSACTION ISOLATION LEVEL command, it makes > sense to make them GUC_NO_SHOW_ALL, but let's keep them under > CLIENT_CONN_STATEMENT. I think that GUCs that aren't listed in config.sgml need to be UNGROUPED; it's just confusing to show them as part of a group when they're not in that group according to the docs. Also, it's almost true that presence of GUC_NO_SHOW_ALL correlates exactly with being UNGROUPED. The couple of exceptions are legacy entries that perhaps should have been changed when they were de-documented. >> * The code's names for the categories do not match up all that >> well with the section headings in config.sgml, eg we have >> Query Tuning in guc.c and Query Planning in the docs. Should we >> try to sync that? > I think we can change the docs to match the guc.c code wordings. Thoughts? Meh... not sure why we'd take the docs as gospel up to this point and then suddenly reverse course. After thinking about it, I think it's fine if the guc.c string is a shortened form of the config.sgml section title. For instance, I don't feel a need to make "Reporting and Logging" match the docs' "Error Reporting and Logging". But places where it's just randomly different, like "Query Tuning" vs. "Query Planning", probably should be fixed to avoid confusion. > There is another thread at [1] that discusses cleaning up the unused > enums or modifying the GUC categories. Ah, I'd forgotten that thread already. I included Justin as part author on this commit. regards, tom lane ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 2021-05-08 08:33 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-08 16:25 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> @ 2021-05-09 13:00 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-11 09:29 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 0 siblings, 1 reply; 7+ messages in thread From: Bharath Rupireddy @ 2021-05-09 13:00 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org, leiyanliang@highgo.com, Justin Pryzby <pryzby@telsasoft.com> On Sat, May 8, 2021 at 9:55 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > It looks like we are using GUC_NO_SHOW_ALL for unused, deprecated, or > > the GUCs being used by other commands. Since the above 3 GUCs are > > being used by START TRANSACTION ISOLATION LEVEL command, it makes > > sense to make them GUC_NO_SHOW_ALL, but let's keep them under > > CLIENT_CONN_STATEMENT. > > I think that GUCs that aren't listed in config.sgml need to be > UNGROUPED; it's just confusing to show them as part of a group > when they're not in that group according to the docs. Also, > it's almost true that presence of GUC_NO_SHOW_ALL correlates > exactly with being UNGROUPED. The couple of exceptions are > legacy entries that perhaps should have been changed when they > were de-documented. I think the GUCs that have the GUC_NO_SHOW_ALL flag in guc.c, are not showing up in pg_settings output along with show all and they are also not mentioned in the config.sgml. Even if they aren't categorized under UNGROUPED in guc.c that's not visible to the users. Therefore, IMO we can retain the transaction_deferrable, transaction_isolation, transaction_read_only category as is i.e. CLIENT_CONN_STATEMENT, just add GUC_NO_SHOW_ALL flag and maybe a comment "/* Not for general use --- used by START TRANSACTION ISOLATION LEVEL */. > >> * The code's names for the categories do not match up all that > >> well with the section headings in config.sgml, eg we have > >> Query Tuning in guc.c and Query Planning in the docs. Should we > >> try to sync that? > > > I think we can change the docs to match the guc.c code wordings. Thoughts? > > Meh... not sure why we'd take the docs as gospel up to this point > and then suddenly reverse course. > > After thinking about it, I think it's fine if the guc.c string is a > shortened form of the config.sgml section title. For instance, > I don't feel a need to make "Reporting and Logging" match the docs' > "Error Reporting and Logging". But places where it's just randomly > different, like "Query Tuning" vs. "Query Planning", probably > should be fixed to avoid confusion. +1 to change Query Planning in docs to Query Tuning to match in guc.c. Remaining seems fine: (in guc.c, in docs) --> (Resource Usage, Resource Consumption), (Write-Ahead Log, Write Ahead Log), (Query Tuning, Query Planning), (Reporting and Logging, Error Reporting and Logging), (Statistics, Run-time Statistics), (Autovacuum, Automatic Vacuuming) With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com ^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #16997: parameter server_encoding's category problem 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 2021-05-08 08:33 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-08 16:25 ` Re: BUG #16997: parameter server_encoding's category problem Tom Lane <tgl@sss.pgh.pa.us> 2021-05-09 13:00 ` Re: BUG #16997: parameter server_encoding's category problem Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> @ 2021-05-11 09:29 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 0 siblings, 0 replies; 7+ messages in thread From: Bharath Rupireddy @ 2021-05-11 09:29 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org, Justin Pryzby <pryzby@telsasoft.com> On Sun, May 9, 2021 at 6:30 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > I think that GUCs that aren't listed in config.sgml need to be > > UNGROUPED; it's just confusing to show them as part of a group > > when they're not in that group according to the docs. Also, > > it's almost true that presence of GUC_NO_SHOW_ALL correlates > > exactly with being UNGROUPED. The couple of exceptions are > > legacy entries that perhaps should have been changed when they > > were de-documented. > > I think the GUCs that have the GUC_NO_SHOW_ALL flag in guc.c, are not > showing up in pg_settings output along with show all and they are also > not mentioned in the config.sgml. Even if they aren't categorized > under UNGROUPED in guc.c that's not visible to the users. Therefore, > IMO we can retain the transaction_deferrable, transaction_isolation, > transaction_read_only category as is i.e. CLIENT_CONN_STATEMENT, just > add GUC_NO_SHOW_ALL flag and maybe a comment "/* Not for general use > --- used by START TRANSACTION ISOLATION LEVEL */. Added GUC_NO_SHOW_ALL flag to transaction_deferrable, transaction_isolation and transaction_read_only. > > After thinking about it, I think it's fine if the guc.c string is a > > shortened form of the config.sgml section title. For instance, > > I don't feel a need to make "Reporting and Logging" match the docs' > > "Error Reporting and Logging". But places where it's just randomly > > different, like "Query Tuning" vs. "Query Planning", probably > > should be fixed to avoid confusion. > > +1 to change Query Planning in docs to Query Tuning to match in guc.c. > > Remaining seems fine: (in guc.c, in docs) --> (Resource Usage, > Resource Consumption), (Write-Ahead Log, Write Ahead Log), (Query > Tuning, Query Planning), (Reporting and Logging, Error Reporting and > Logging), (Statistics, Run-time Statistics), (Autovacuum, Automatic > Vacuuming) Changed "Query Planning" in the config.sgml to "Query Tuning". Attaching a small patch with the above changes. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com Attachments:^ permalink raw reply [nested|flat] 7+ messages in threadv1-0001-Adjust-some-GUCs-and-docs.patch (application/x-patch, 2.6K) download
From 441c03c5433b6c13880cba35a470b0851f116b7b Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy <bharath.rupireddy@enterprisedb.com> Date: Tue, 11 May 2021 11:58:26 +0530 Subject: [PATCH v1] Adjust some GUCs and docs --- doc/src/sgml/config.sgml | 2 +- src/backend/utils/misc/guc.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 45bd1f1b7e..66db304b37 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4830,7 +4830,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </sect1> <sect1 id="runtime-config-query"> - <title>Query Planning</title> + <title>Query Tuning</title> <sect2 id="runtime-config-query-enable"> <title>Planner Method Configuration</title> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0a180341c2..6c2906fdd2 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1679,10 +1679,12 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { + /* Not for general use --- used by START TRANSACTION ISOLATION LEVEL */ {"transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT, gettext_noop("Sets the current transaction's read-only status."), NULL, - GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE + GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | + GUC_DISALLOW_IN_FILE }, &XactReadOnly, false, @@ -1698,10 +1700,12 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { + /* Not for general use --- used by START TRANSACTION ISOLATION LEVEL */ {"transaction_deferrable", PGC_USERSET, CLIENT_CONN_STATEMENT, gettext_noop("Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures."), NULL, - GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE + GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | + GUC_DISALLOW_IN_FILE }, &XactDeferrable, false, @@ -4652,10 +4656,12 @@ static struct config_enum ConfigureNamesEnum[] = }, { + /* Not for general use --- used by START TRANSACTION ISOLATION LEVEL */ {"transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT, gettext_noop("Sets the current transaction's isolation level."), NULL, - GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE + GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | + GUC_DISALLOW_IN_FILE }, &XactIsoLevel, XACT_READ_COMMITTED, isolation_level_options, -- 2.25.1
end of thread, other threads:[~2021-05-11 09:29 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-05-07 06:31 BUG #16997: parameter server_encoding's category problem PG Bug reporting form <noreply@postgresql.org> 2021-05-07 11:43 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-07 20:58 ` Tom Lane <tgl@sss.pgh.pa.us> 2021-05-08 08:33 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-08 16:25 ` Tom Lane <tgl@sss.pgh.pa.us> 2021-05-09 13:00 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> 2021-05-11 09:29 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
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