Re: Providing catalog view to pg_hba.conf file - Patch submission

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "Prabakaran, Vaishnavi" <vaishnavip(at)fast(dot)au(dot)fujitsu(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: 2015-01-30 03:13:17
Message-ID: CAA4eK1LYiaNvJczX4rropqm3o4YK=p_BJPYAX440Arn-FK7HEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 30, 2015 at 3:16 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>
> On 1/29/15 6:19 AM, Fabrízio de Royes Mello wrote:
>>
>> Perhaps a fdw can't be the best choice, maybe a complete new SQL syntax
to manipulate HBA entries like we did with ALTER SYSTEM. It's just some
thoughts about it.
>
>
> Aside from Tom's concern about sets not being a good way to handle this
(which I agree with), the idea of "editing" pg_hba.conf via SQL raises all
the problems that were brought up when ALTER SYSTEM was being developed.
One of the big problems is a question of how you can safely modify a text
file that's full of comments and what-not. You'd need to address those
issues if you hope to modify pg_hba.conf via SQL.
>

I think the big problem you are mentioning can be resolved in
a similar way as we have done for ALTER SYSTEM which is
to have a separate file (.auto.conf) for settings done via
ALTER SYSTEM command, do you see any major problem
with that approach.

Here one thing that is different is the format of pg_hba.conf file
which is quite different from postgresql.conf file, it seems to me
if want to handle this via ALTER SYSTEM we need to have
additional/different syntax.

For Example,

ALTER SYSTEM AUTH TYPE = <type_value> DATABASE = <value> ...
or
ALTER SYSTEM AUTH ...

In second syntax, user can mention the whole record. Internally we
need to validate the syntax and values.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-01-30 03:28:43 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message Stephen Frost 2015-01-30 03:09:38 Re: jsonb, unicode escapes and escaped backslashes