Re: Why BgWriterDelay is fixed?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: 高健 <luckyjackgao(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Why BgWriterDelay is fixed?
Date: 2012-10-29 16:18:43
Message-ID: 19472.1351527523@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> The value hard coded into the C code is the starting value, or
> default. It is not a constant.

> Indeed, I don't think that value is even used. I think that upon
> start-up, that value gets set to the default listed in the guc.c file
> (which is also 200), and so the value listed in the bgwriter.c file is
> merely a mnemonic to remind people editing the file what the default
> value is.

It's partly that, and mostly to ensure that the variable has some valid
value even before the configuration file has been read. The latter
consideration might or might not be important for BgWriterDelay in
particular; but it is important for some GUC variables, so we tend to
follow the coding pattern of initializing GUC variables to their
defaults whenever practical.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-10-29 16:29:08 Re: Access to postgresql query optimizer output
Previous Message Peter Geoghegan 2012-10-29 16:12:50 Re: Why BgWriterDelay is fixed?