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

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Cc: "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-27 22:47:10
Message-ID: 54C8156E.1080500@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/27/15 1:04 AM, Haribabu Kommi wrote:
> On Mon, Jun 30, 2014 at 5:06 PM, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com> wrote:
>> I think having two columns would work. The columns could be called
>> "database" and "database_list" and "user" and "user_list" respectively.
>>
>> The database column may contain one of "all", "sameuser", "samegroup",
>> "replication", but if it's empty, database_list will contain an array of
>> database names. Then ("all", {}) and ("", {all}) are easily separated.
>> Likewise for user and user_list.
>
> Thanks for the review.
>
> I corrected all the review comments except the one to add two columns
> as (database, database_list and user, user_list). I feel this may cause
> some confusion to the users.
>
> Here I attached the latest version of the patch.
> I will add this patch to the next commitfest.

Apologies if this was covered, but why isn't the IP address an inet instead of text?

Also, what happens if someone reloads the config in the middle of running the SRF? ISTM it'd be better to do something like process all of parsed_hba_lines into a tuplestore. Obviously there's still a race condition there, but at least it's a lot smaller, and AFAIK no worse than the pg_stats views.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-01-27 22:55:20 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Stephen Frost 2015-01-27 22:45:55 Re: WITH CHECK and Column-Level Privileges