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

From Justin Pryzby
Subject Re: fix stats_fetch_consistency value in postgresql.conf.sample
Date
Msg-id 20220611144137.GC29853@telsasoft.com
Whole thread Raw
In response to Re: fix stats_fetch_consistency value in postgresql.conf.sample  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Mon, May 30, 2022 at 05:27:19PM +0900, Kyotaro Horiguchi wrote:
> At Sat, 28 May 2022 13:22:45 -0700, Andres Freund <andres@anarazel.de> wrote in 
> > Hi,
> > 
> > On 2022-05-26 16:27:53 +0900, Kyotaro Horiguchi wrote:
> > > 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.
> > 
> > I wonder if we shouldn't just expose a C function to do this, rather than
> > having a separate implementation in a tap test.
> 
> It was annoying that I needed to copy the unit-conversion stuff.  I
> did that in the attached.  parse_val() and check_val() and the duped
> data is removed.

Note that this gives:

guc.c:7573:9: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]

with gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)

I wonder whether you'd consider renaming pg_normalize_config_value() to
pg_pretty_config_value() or similar.

-- 
Justin



pgsql-hackers by date:

Previous
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Replica Identity check of partition table on subscriber
Next
From: Andrew Dunstan
Date:
Subject: Subscription tests vs log_error_verbosity