Re: logging settings - Mailing list pgsql-general

From Michael Fuhr
Subject Re: logging settings
Date
Msg-id 20060203035635.GA47271@winnie.fuhr.org
Whole thread Raw
In response to logging settings  (Mott Leroy <mott@acadaca.com>)
List pgsql-general
On Thu, Feb 02, 2006 at 06:19:53PM -0500, Mott Leroy wrote:
> On Postgres 7.4.1

That's pretty old.  If you can't upgrade to 8.0 or 8.1 then at least
consider staying up to date with bug fixes by using the latest
version in the 7.4 branch (currently 7.4.11).

> I've been experiencing some strangeness with the logging settings in
> postgresql.conf.
>
> I turned on statement logging (and duration), issued a "pg_ctl reload"
> and got it working (logging to sys log and standard out). Now however,
> when i try to turn it off, it won't turn off, using the same procedure.
> I've now commented out all the lines related to logging, but it's still
> logging.

Did you change the settings to off and leave them uncommented or
did you simply comment them out?  Commenting out the lines will
leave the settings at their previous values until you restart the
server; if you want to change settings with a reload (not a restart)
then change the values and leave them uncommented.  Once you've
actively changed the settings back to their defaults then you could
comment them out.

> Is it possible that this is related to connection pooling? Does each
> connection hold these settings, such that a reload of the configuration
> file only affects new connections, not existing ones?

I just did some tests in 7.4.11 and settings like log_statement and
log_min_duration_statement changed within a session as I reloaded
the server, so I don't think connection pooling would matter (at
least not for those settings).  I think the more likely problem is
that you commented out the settings instead of actually changing
them.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Richard Sydney-Smith
Date:
Subject: Automating Backup
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL best practices?