Re: [PATCH] HINT: pg_hba.conf changed since last config reload - Mailing list pgsql-hackers

From Alex Shulgin
Subject Re: [PATCH] HINT: pg_hba.conf changed since last config reload
Date
Msg-id 871tnvwst3.fsf@commandprompt.com
Whole thread Raw
In response to Re: [PATCH] HINT: pg_hba.conf changed since last config reload  (Steve Singer <steve@ssinger.info>)
Responses Re: [PATCH] HINT: pg_hba.conf changed since last config reload  (Craig Ringer <craig@2ndquadrant.com>)
Re: [PATCH] HINT: pg_hba.conf changed since last config reload  (Steve Singer <steve@ssinger.info>)
List pgsql-hackers
Steve Singer <steve@ssinger.info> writes:

> On 12/15/2014 11:38 AM, Alex Shulgin wrote:
>
>> These are all valid concerns IMHO. Attached is the modified version
>> of the original patch by Craig, addressing the handling of the new
>> hint_log error data field and removing the client-side HINT. I'm
>> also moving this to the current CF. -- Alex
>>
>>
>
>
> The updated patch removes the client message. I feel this addresses
> Peter's concern.  The updated patch also addresses the missing free I
> mentioned in my original review.
>
> The patch applies cleanly to head,
>
> One thing I'm noticed while testing is that if you do the following
>
> 1. Edit pg_hba.conf  to allow a connection from somewhere
> 2. Attempt to connect, you get an error + the hind in the server log
> 3. Make another change to pg_hba.conf and introduce an error in the file
> 4. Attempt to reload the config files, pg_hba.conf the reload fails
> because of the above error
> 5. Attempt to connect you still can't connect since we have the
> original pg_hba.conf loaded
>
> You don't get the warning in step 5 since we update PgReloadTime even
> if the reload didn't work.
>
> Is this enough of a concern to justify the extra complexity in
> tracking the reload time of the pg_hba and pg_ident times directly?

I don't think so.  The scenario this patch relies on assumes that the
DBA will remember to look in the log if something goes wrong, and in
your case there would be a message like the following:

WARNING:  pg_hba.conf not reloaded

So an extra hint about file timestamp is unneeded.

--
Alex



pgsql-hackers by date:

Previous
From: Chris Butler
Date:
Subject: Re: [pgsql-pkg-debian] Updated libpq5 packages cause connection errors on postgresql 9.2
Next
From: Craig Ringer
Date:
Subject: Re: [PATCH] HINT: pg_hba.conf changed since last config reload