Thread: Question about "ident_file" in postgres.conf

Question about "ident_file" in postgres.conf

From
Tianyin Xu
Date:
Hi, all,

I have a question regarding the "ident_file" configuration entry.

Why the server refused to start without specifying the "ident_file", but it never cares whether the given "ident_file" is valid or not? In other word, a misconfigured non-existent path for "ident_file" can also start the server with a background message.

This does not make too much sense to me. I think the system behavior should be opposite. If the user didn't specify the "ident_file", the pg server should ignore. But if the user specifies one and that one is not valid, the user should stop because it clearly means the path is misconfigured.

Is there any concern here? Otherwise I would suggest and provide a patch to check the validity of the "ident_file" like what pg is doing for "data_directory" and "hba_file".

Thanks a lot!
Tianyin

--
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/

Re: Question about "ident_file" in postgres.conf

From
Magnus Hagander
Date:
On Tue, Nov 6, 2012 at 9:08 AM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
Hi, all,

I have a question regarding the "ident_file" configuration entry.

Why the server refused to start without specifying the "ident_file", but it never cares whether the given "ident_file" is valid or not? In other word, a misconfigured non-existent path for "ident_file" can also start the server with a background message.

This does not make too much sense to me. I think the system behavior should be opposite. If the user didn't specify the "ident_file", the pg server should ignore. But if the user specifies one and that one is not valid, the user should stop because it clearly means the path is misconfigured.

Is there any concern here? Otherwise I would suggest and provide a patch to check the validity of the "ident_file" like what pg is doing for "data_directory" and "hba_file".

This is definitely a known problem. It's actually on the TODO list already, just not phrased in a way that makes it likely to be found.

It should be treated the same way as the hba_file. So sure, please do provide a patch for that if you can.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Question about "ident_file" in postgres.conf

From
Jeff Janes
Date:
On Tue, Nov 6, 2012 at 3:16 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Tue, Nov 6, 2012 at 9:08 AM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
>>
>> Hi, all,
>>
>> I have a question regarding the "ident_file" configuration entry.
>>
>> Why the server refused to start without specifying the "ident_file", but
>> it never cares whether the given "ident_file" is valid or not? In other
>> word, a misconfigured non-existent path for "ident_file" can also start the
>> server with a background message.
>>
>> This does not make too much sense to me. I think the system behavior
>> should be opposite. If the user didn't specify the "ident_file", the pg
>> server should ignore. But if the user specifies one and that one is not
>> valid, the user should stop because it clearly means the path is
>> misconfigured.
>>
>> Is there any concern here? Otherwise I would suggest and provide a patch
>> to check the validity of the "ident_file" like what pg is doing for
>> "data_directory" and "hba_file".
>
>
> This is definitely a known problem. It's actually on the TODO list already,
> just not phrased in a way that makes it likely to be found.
>
> It should be treated the same way as the hba_file. So sure, please do
> provide a patch for that if you can.


A patch for this is already committed for 9.3.

https://commitfest.postgresql.org/action/patch_view?id=889

Cheers,

Jeff


Re: Question about "ident_file" in postgres.conf

From
Magnus Hagander
Date:
On Tue, Nov 6, 2012 at 5:25 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
On Tue, Nov 6, 2012 at 3:16 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Tue, Nov 6, 2012 at 9:08 AM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
>>
>> Hi, all,
>>
>> I have a question regarding the "ident_file" configuration entry.
>>
>> Why the server refused to start without specifying the "ident_file", but
>> it never cares whether the given "ident_file" is valid or not? In other
>> word, a misconfigured non-existent path for "ident_file" can also start the
>> server with a background message.
>>
>> This does not make too much sense to me. I think the system behavior
>> should be opposite. If the user didn't specify the "ident_file", the pg
>> server should ignore. But if the user specifies one and that one is not
>> valid, the user should stop because it clearly means the path is
>> misconfigured.
>>
>> Is there any concern here? Otherwise I would suggest and provide a patch
>> to check the validity of the "ident_file" like what pg is doing for
>> "data_directory" and "hba_file".
>
>
> This is definitely a known problem. It's actually on the TODO list already,
> just not phrased in a way that makes it likely to be found.
>
> It should be treated the same way as the hba_file. So sure, please do
> provide a patch for that if you can.


A patch for this is already committed for 9.3.

https://commitfest.postgresql.org/action/patch_view?id=889



D'oh. I knew that. Can't believe I forgot. Apologies!


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Question about "ident_file" in postgres.conf

From
Tianyin Xu
Date:
I see. Thanks a lot for the explanation!

Tianyin


On Tue, Nov 6, 2012 at 8:32 AM, Magnus Hagander <magnus@hagander.net> wrote:
On Tue, Nov 6, 2012 at 5:25 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
On Tue, Nov 6, 2012 at 3:16 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Tue, Nov 6, 2012 at 9:08 AM, Tianyin Xu <tixu@cs.ucsd.edu> wrote:
>>
>> Hi, all,
>>
>> I have a question regarding the "ident_file" configuration entry.
>>
>> Why the server refused to start without specifying the "ident_file", but
>> it never cares whether the given "ident_file" is valid or not? In other
>> word, a misconfigured non-existent path for "ident_file" can also start the
>> server with a background message.
>>
>> This does not make too much sense to me. I think the system behavior
>> should be opposite. If the user didn't specify the "ident_file", the pg
>> server should ignore. But if the user specifies one and that one is not
>> valid, the user should stop because it clearly means the path is
>> misconfigured.
>>
>> Is there any concern here? Otherwise I would suggest and provide a patch
>> to check the validity of the "ident_file" like what pg is doing for
>> "data_directory" and "hba_file".
>
>
> This is definitely a known problem. It's actually on the TODO list already,
> just not phrased in a way that makes it likely to be found.
>
> It should be treated the same way as the hba_file. So sure, please do
> provide a patch for that if you can.


A patch for this is already committed for 9.3.

https://commitfest.postgresql.org/action/patch_view?id=889



D'oh. I knew that. Can't believe I forgot. Apologies!



--
Tianyin XU,
http://cseweb.ucsd.edu/~tixu/