Re: pg_postmaster_reload_time() patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: pg_postmaster_reload_time() patch
Date
Msg-id 28779.1209936213@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_postmaster_reload_time() patch  ("George Gensure" <werkt0@gmail.com>)
List pgsql-patches
"George Gensure" <werkt0@gmail.com> writes:
> The new function name is pg_conf_load_time()

Applied with revisions.

> I'm now using LWLocks only on the backend in order to protect the
> PgReloadTime from mid copy reads.  This may prove to be unnecessary,
> since the code to handle HUPs seems to be executed synchronously on
> the backend, but I'll let someone else tell me its safe before
> removing it.

The locking was not only entirely useless, but it didn't even compile,
since you'd not supplied a definition for "ReloadTimeLock".  I took
it out.

I moved the setting of PgReloadTime into ProcessConfigFile.
The advantages are (1) only one place to do it, and (2) inside
ProcessConfigFile, we know whether or not the reload actually "took".
As committed, the definition of PgReloadTime is really "the time of
the last *successful* load of postgresql.conf", which I think is more
useful than "the last attempted load".

I also improved the documentation a bit and added the copy step needed
in restore_backend_variables().

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Text <-> C string
Next
From: "Brendan Jurd"
Date:
Subject: Re: [HACKERS] Multiline privileges in \z