pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Christoph Anton Mitterer <calestyo@scientia.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6150: commit_delay should have unit ms
Date: Tue, 14 Aug 2012 16:18:40 -0400
Message-ID: <20120814201840.GD11913@momjian.us> (raw)
In-Reply-To: <201108042130.p74LUZF0077012@wwwmaster.postgresql.org>
References: <201108042130.p74LUZF0077012@wwwmaster.postgresql.org>

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. +

Attachments:

units.diff (text/x-diff, 1.5K) download diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c new file mode 100644 index 80e5aa1..a1d303b *** a/src/backend/utils/misc/guc.c --- b/src/backend/utils/misc/guc.c *************** static struct config_int ConfigureNamesI *** 2033,2039 **** {"commit_delay", PGC_USERSET, WAL_SETTINGS, gettext_noop("Sets the delay in microseconds between transaction commit and " "flushing WAL to disk."), ! NULL }, &CommitDelay, 0, 0, 100000, --- 2033,2040 ---- {"commit_delay", PGC_USERSET, WAL_SETTINGS, gettext_noop("Sets the delay in microseconds between transaction commit and " "flushing WAL to disk."), ! NULL, ! GUC_UNIT_MS }, &CommitDelay, 0, 0, 100000, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample new file mode 100644 index c24afb0..adcbcf6 *** a/src/backend/utils/misc/postgresql.conf.sample --- b/src/backend/utils/misc/postgresql.conf.sample *************** *** 137,143 **** # - Cost-Based Vacuum Delay - ! #vacuum_cost_delay = 0ms # 0-100 milliseconds #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits --- 137,143 ---- # - Cost-Based Vacuum Delay - ! #vacuum_cost_delay = 0 # 0-100 milliseconds #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits

view thread (5+ messages)  latest in thread

Message-ID: <20120814201840.GD11913@momjian.us>
Permalink:  ../20120814201840.GD11913@momjian.us/
Also on:    postgresql.org/message-id/20120814201840.GD11913@momjian.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, calestyo@scientia.net
  Subject: Re: BUG #6150: commit_delay should have unit ms
  In-Reply-To: <20120814201840.GD11913@momjian.us>
  References: <201108042130.p74LUZF0077012@wwwmaster.postgresql.org> <20120814201840.GD11913@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox