Re: log_min_duration_statement units - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: log_min_duration_statement units
Date
Msg-id 200904072343.n37NhN225096@momjian.us
Whole thread Raw
In response to Re: log_min_duration_statement units  (Bruce Momjian <bruce@momjian.us>)
Responses Re: log_min_duration_statement units  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> > > Tom Lane wrote:
> > >> You know, it suddenly strikes me that this is going in largely the wrong
> > >> direction.
> >
> > > Right, the problem particularly is with the -1/special values that don't
> > > have a real unit.
> >
> > I don't object to what you did to postgresql.conf.sample, but I think
> > you should revert the changes to the descriptions in guc.c.
>
> Agreed;  attached patch applied.

However, keep in mind that units are _not_ displayed for zero values:

    test=> show statement_timeout;
     statement_timeout
    -------------------
     0
    (1 row)

    test=> set statement_timeout = 100;
    SET
    test=> show statement_timeout;
     statement_timeout
    -------------------
     100ms
    (1 row)

because of this test in guc.c:

                    else if (use_units && result > 0 &&
                             (record->flags & GUC_UNIT_TIME))

pg_settings does show the units.  Changing this to display the units
might be odd since many zero values mean 'disabled'.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: log_min_duration_statement units
Next
From: Tom Lane
Date:
Subject: Re: log_min_duration_statement units