Thread: log_timestamp and SIGHUP?

log_timestamp and SIGHUP?

From
Andrew Sullivan
Date:
Hi,

Postgres 7.2.x.

I just set log_timestamp=false and sent the postmaster a SIGHUP.  But
still I have the timestamps.  Doesn't that work?  The docs don't say
that this is one of the "startup only" properties.

A
--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Re: log_timestamp and SIGHUP?

From
Tom Lane
Date:
Andrew Sullivan <andrew@libertyrms.info> writes:
> I just set log_timestamp=false and sent the postmaster a SIGHUP.  But
> still I have the timestamps.  Doesn't that work?

It sure looks like it should, modulo the fact that backends won't
re-read postgresql.conf until they next reach the
wait-for-client-command outer loop.  You sure you SIGHUP'd the right
process?

            regards, tom lane

Re: log_timestamp and SIGHUP?

From
Andrew Sullivan
Date:
On Tue, Mar 18, 2003 at 11:47:23PM -0500, Tom Lane wrote:
> It sure looks like it should, modulo the fact that backends won't
> re-read postgresql.conf until they next reach the
> wait-for-client-command outer loop.

Hmm.  The outer loop should surely happen after a COMMIT/ROLLBACK,
right?

> You sure you SIGHUP'd the right process?

Well, assuming the postmaster.pid file wasn't lying.  But yes,
because some of the other changes I made did take effect.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Re: log_timestamp and SIGHUP?

From
Tom Lane
Date:
Andrew Sullivan <andrew@libertyrms.info> writes:
> On Tue, Mar 18, 2003 at 11:47:23PM -0500, Tom Lane wrote:
>> It sure looks like it should, modulo the fact that backends won't
>> re-read postgresql.conf until they next reach the
>> wait-for-client-command outer loop.

> Hmm.  The outer loop should surely happen after a COMMIT/ROLLBACK,
> right?

Yeah.  [tries it]  It works for me ...


I have another theory: if you change
    #log_timestamp = false
to
    log_timestamp = true
you cannot reverse that by returning the line to its original state:
the original state is a comment and won't cause the postmaster to change
its variable.  You must say
    log_timestamp = false
if you want to get the value changed back via SIGHUP.

(Sorry if that seems insulting to your intelligence ... but I've been
bit by it at least once myself ...)

            regards, tom lane

Re: log_timestamp and SIGHUP?

From
Andrew Sullivan
Date:
On Thu, Mar 20, 2003 at 10:26:58AM -0500, Tom Lane wrote:
> Yeah.  [tries it]  It works for me ...

Well, I'm stumped, then.  It definitely did not work (on multiple
tries) on the system where I did it.

>     #log_timestamp = false
> to
>     log_timestamp = true
> you cannot reverse that by returning the line to its original state:

No, I know this, too (one of the folks here made exactly that error
just the other day, actually).

It's not a big deal, really.  I was just curious.  And annoyed that
something is up, but I don't know what.

Thanks.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110