Thread: BUG #6150: commit_delay should have unit ms

BUG #6150: commit_delay should have unit ms

From
"Christoph Anton Mitterer"
Date:
The following bug has been logged online:

Bug reference:      6150
Logged by:          Christoph Anton Mitterer
Email address:      calestyo@scientia.net
PostgreSQL version: 0.9
Operating system:   Debian sid
Description:        commit_delay should have unit ms
Details:

Hi.

AFAIK form the documentation, the setting commit_delay, should have the base
unit "ms".

However, when doing something like
$ psql -c 'SELECT name,vartype,unit FROM pg_settings;' | grep commit_delay
I get:
could not change directory to "/root/test"
 commit_delay                    | integer |

No unit.

Cheers,
Chris.

Re: BUG #6150: commit_delay should have unit ms

From
Bruce Momjian
Date:
On Thu, Aug  4, 2011 at 09:30:35PM +0000, Christoph Anton Mitterer wrote:
>
> The following bug has been logged online:
>
> Bug reference:      6150
> Logged by:          Christoph Anton Mitterer
> Email address:      calestyo@scientia.net
> PostgreSQL version: 0.9
> Operating system:   Debian sid
> Description:        commit_delay should have unit ms
> Details:
>
> Hi.
>
> AFAIK form the documentation, the setting commit_delay, should have the base
> unit "ms".
>
> However, when doing something like
> $ psql -c 'SELECT name,vartype,unit FROM pg_settings;' | grep commit_delay
> I get:
> could not change directory to "/root/test"
>  commit_delay                    | integer |
>
> No unit.

Yes, you are correct.  The attached, applied patch for Postgres 9.3 will
properly display units.  I checked all the other variables and they all
had proper units.

I also removed an unnecessary units designation in
postgresql.conf.sample for a zero value --- if we want to put units on
zero values, we should do it consistently in a separate patch.

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

  + It's impossible for everything to be true. +

Attachment

Re: BUG #6150: commit_delay should have unit ms

From
Bruce Momjian
Date:
On Tue, Aug 14, 2012 at 04:18:40PM -0400, Bruce Momjian wrote:
> On Thu, Aug  4, 2011 at 09:30:35PM +0000, Christoph Anton Mitterer wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference:      6150
> > Logged by:          Christoph Anton Mitterer
> > Email address:      calestyo@scientia.net
> > PostgreSQL version: 0.9
> > Operating system:   Debian sid
> > Description:        commit_delay should have unit ms
> > Details:
> >
> > Hi.
> >
> > AFAIK form the documentation, the setting commit_delay, should have the base
> > unit "ms".
> >
> > However, when doing something like
> > $ psql -c 'SELECT name,vartype,unit FROM pg_settings;' | grep commit_delay
> > I get:
> > could not change directory to "/root/test"
> >  commit_delay                    | integer |
> >
> > No unit.
>
> Yes, you are correct.  The attached, applied patch for Postgres 9.3 will
> properly display units.  I checked all the other variables and they all
> had proper units.
>
> I also removed an unnecessary units designation in
> postgresql.conf.sample for a zero value --- if we want to put units on
> zero values, we should do it consistently in a separate patch.

Opps, turns out the units are microseconds (as pointed out to me by
Magnus), and we don't have a microsecond designation in that file, so I
reverted that and just added a C comment about why it has no units.

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

  + It's impossible for everything to be true. +

Re: BUG #6150: commit_delay should have unit ms

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> Opps, turns out the units are microseconds (as pointed out to me by
> Magnus), and we don't have a microsecond designation in that file, so I
> reverted that and just added a C comment about why it has no units.

Is it worth adding support for microseconds in there?  Not sure.

Technically it wouldn't be very hard, but I seem to recall this was
discussed before and we were worried about whether people would be
confused about what "ms" means.  Don't know that "us" would be
universally recognized, either.

            regards, tom lane

Re: BUG #6150: commit_delay should have unit ms

From
Bruce Momjian
Date:
On Tue, Aug 14, 2012 at 05:26:39PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Opps, turns out the units are microseconds (as pointed out to me by
> > Magnus), and we don't have a microsecond designation in that file, so I
> > reverted that and just added a C comment about why it has no units.
>
> Is it worth adding support for microseconds in there?  Not sure.
>
> Technically it wouldn't be very hard, but I seem to recall this was
> discussed before and we were worried about whether people would be
> confused about what "ms" means.  Don't know that "us" would be
> universally recognized, either.

Yes, I do remember the discussion.  Because commit_delay is so rarely
used, and the only one that uses usec units by default, it didn't seem
to make sense to add documentation for an additional unit.

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

  + It's impossible for everything to be true. +