Re: fix stats_fetch_consistency value in postgresql.conf.sample

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: fix stats_fetch_consistency value in postgresql.conf.sample
Дата
Msg-id 20220525.155623.1140106707572944089.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на fix stats_fetch_consistency value in postgresql.conf.sample  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: fix stats_fetch_consistency value in postgresql.conf.sample  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
At Wed, 25 May 2022 14:00:23 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Tue, May 24, 2022 at 09:28:49PM -0700, Andres Freund wrote:
> > And done. Thanks Nathan!
> 
> Shouldn't you also refresh pgstat_fetch_consistency in pgstat.c for
> consistency?
> 
> > I wonder if we should make src/test/modules/test_misc/t/003_check_guc.pl
> > detect this kind of thing?
> 
> That sounds like a good idea to me.

I think the work as assumed not to use detailed knowledge of each
variable.  Due to lack of knowlege about the detail of each variable,
for example, type, unit, internal exansion, we cannot check for the
following values.

- Numbers with unit  (MB, kB, s, min ...)
- internally expanded string (FILE, ConfigDir)

So it's hard to automate to check consistency of all variables, but I
found the following inconsistencies between the sample config file and
GUC default value.  C default value cannot be revealed so it is
ignored.

The following results are not deeply confirmed yet.

13 apparent inconsistencies are found. These should be fixed.

archive_command = "(disabled)" != ""
bgwriter_flush_after = "64" != "0"
checkpoint_flush_after = "32" != "0"
cluster_name = "main" != ""
default_text_search_config = "pg_catalog.english" != "pg_catalog.simple"
fsync = "off" != "on"
log_replication_commands = "on" != "off"
log_statement = "all" != "none"
max_wal_senders = "0" != "10"
restart_after_crash = "off" != "on"
stats_fetch_consistency = "cache" != "none"
wal_sync_method = "fdatasync" != "fsync"


11 has letter-case inconsistencies. Are these need to be fixed?

event_source = "postgresql" != "PostgreSQL"
lc_messages = "c" != "C"
lc_monetary = "en_us.utf-8" != "C"
lc_numeric = "en_us.utf-8" != "C"
lc_time = "en_us.utf-8" != "C"
log_filename = "postgresql-%y-%m-%d_%h%m%s.log" != "postgresql-%Y-%m-%d_%H%M%S.log"
log_line_prefix = "%m [%p] %q%a " != "%m [%p] "
ssl_ciphers = "high:medium:+3des:!anull" != "HIGH:MEDIUM:+3DES:!aNULL"
ssl_min_protocol_version = "tlsv1.2" != "TLSv1.2"
syslog_facility = "local0" != "LOCAL0"
timezone_abbreviations = "default" != "Default"


The followings are the result of automatic configuration?

client_encoding = "utf8" != "sql_ascii"
data_directory = "/home/horiguti/work/postgresql/src/test/modules/test_misc/tmp_check/t_003_check_guc_main_data/pgdata"
!="ConfigDir"
 
hba_file =
"/home/horiguti/work/postgresql/src/test/modules/test_misc/tmp_check/t_003_check_guc_main_data/pgdata/pg_hba.conf"!=
"ConfigDir/pg_hba.conf"
ident_file =
"/home/horiguti/work/postgresql/src/test/modules/test_misc/tmp_check/t_003_check_guc_main_data/pgdata/pg_ident.conf"!=
"ConfigDir/pg_ident.conf"
krb_server_keyfile = "file:/home/horiguti/bin/pgsql_work/etc/krb5.keytab" != "FILE:${sysconfdir}/krb5.keytab"
log_timezone = "asia/tokyo" != "GMT"
timezone = "asia/tokyo" != "GMT"
unix_socket_directories = "/tmp/g3fpspvjuy" != "/tmp"
wal_buffers = "512" != "-1"


The followings are the result of TAP harness?

listen_addresses = "" != "localhost"
port = "60866" != "5432"
wal_level = "minimal" != "replica"


The following is inconsistent, but I'm not sure where the "500" came
from. In guc.c it is defined as 5000 and normal (out of TAP test)
server returns 5000.

wal_retrieve_retry_interval = "500" , "5s"


The followings cannot be automaticaly compared due to hidden unit
conversion, but looks consistent.

authentication_timeout = "60" , "1min"
autovacuum_naptime = "60" , "1min"
autovacuum_vacuum_cost_delay = "2" , "2ms"
bgwriter_delay = "200" , "200ms"
checkpoint_timeout = "300" , "5min"
checkpoint_warning = "30" , "30s"
deadlock_timeout = "1000" , "1s"
effective_cache_size = "524288" , "4GB"
gin_pending_list_limit = "4096" , "4MB"
log_autovacuum_min_duration = "600000" , "10min"
log_rotation_age = "1440" , "1d"
log_rotation_size = "10240" , "10MB"
log_startup_progress_interval = "10000" , "10s"
logical_decoding_work_mem = "65536" , "64MB"
maintenance_work_mem = "65536" , "64MB"
max_stack_depth = "2048" , "2MB"
max_standby_archive_delay = "30000" , "30s"
max_standby_streaming_delay = "30000" , "30s"
max_wal_size = "1024" , "1GB"
min_dynamic_shared_memory = "0" , "0MB"
min_parallel_index_scan_size = "64" , "512kB"
min_parallel_table_scan_size = "1024" , "8MB"
min_wal_size = "80" , "80MB"
shared_buffers = "16384" , "128MB"
temp_buffers = "1024" , "8MB"
wal_decode_buffer_size = "524288" , "512kB"
wal_receiver_status_interval = "10" , "10s"
wal_receiver_timeout = "60000" , "60s"
wal_sender_timeout = "60000" , "60s"
wal_skip_threshold = "2048" , "2MB"
wal_writer_delay = "200" , "200ms"
wal_writer_flush_after = "128" , "1MB"
work_mem = "4096" , "4MB"

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: "ERROR: latch already owned" on gharial
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: fix stats_fetch_consistency value in postgresql.conf.sample