Re: fix stats_fetch_consistency value in postgresql.conf.sample - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: fix stats_fetch_consistency value in postgresql.conf.sample
Date
Msg-id 20220526.162753.632795261813283794.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: fix stats_fetch_consistency value in postgresql.conf.sample  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: fix stats_fetch_consistency value in postgresql.conf.sample  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
At Thu, 26 May 2022 13:00:45 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> At Wed, 25 May 2022 21:25:53 -0500, Justin Pryzby <pryzby@telsasoft.com> wrote in 
> > And I think these should be updated it postgresql.conf to use the same unit as
> > in current_setting().
> > 
> >  track_activity_query_size   | 1kB                                                                      | 1024
> >  wal_buffers                 | 4MB                                                                      | -1
> >  wal_receiver_timeout        | 1min                                                                     | 60s
> >  wal_sender_timeout          | 1min                                                                     | 60s
> 
> I'm not sure we should do so.  Rather I'd prefer 60s than 1min here.

It could be in SQL, but *I* prefer to use perl for this, since it
allows me to write a bit complex things (than simple string
comparison) simpler.

So the attached is a wip version of that

Numeric values are compared considering units. But does not require
the units of the both values to match.  Some variables are ignored by
an explicit instruction (ignored_parameters).  Some variables are
compared case-insensitively by an explicit instruction
(case_insensitive_params).  bool and enum are compared
case-insensitively automatically.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Add --{no-,}bypassrls flags to createuser