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

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(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-02-27 06:30:46
Message-ID: CAJrrPGdgFWN61ZC1skaC=2HFg5f2z+2AwY7RqjUe00eWy2iXBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 7, 2015 at 8:26 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Hi
>
> I am sending a review of this patch.

Thanks for the review. sorry for the delay.

> 4. Regress tests
>
> test rules ... FAILED -- missing info about new view

Thanks. Corrected.

> My objections:
>
> 1. data type for "database" field should be array of name or array of text.
>
> When name contains a comma, then this comma is not escaped
>
> currently: {omega,my stupid extremly, name2,my stupid name}
>
> expected: {"my stupid name",omega,"my stupid extremly, name2"}
>
> Same issue I see in "options" field

Changed including the user column also.

> 2. Reload is not enough for content refresh - logout is necessary
>
> I understand, why it is, but it is not very friendly, and can be very
> stressful. It should to work with last reloaded data.

At present the view data is populated from the variable "parsed_hba_lines"
which contains the already parsed lines of pg_hba.conf file.

During the reload, the hba entries are reloaded only in the postmaster process
and not in every backend, because of this reason the reloaded data is
not visible until
the session is disconnected and connected.

Instead of changing the SIGHUP behavior in the backend to load the hba entries
also, whenever the call is made to the view, the pg_hba.conf file is
parsed to show
the latest reloaded data in the view. This way it doesn't impact the
existing behavior
but it may impact the performance because of file load into memory every time.

Updated patch is attached. comments?

Regards,
Hari Babu
Fujitsu Australia

Attachment Content-Type Size
Catalog_view_to_HBA_settings_patch_V5.patch application/octet-stream 19.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2015-02-27 06:32:45 Re: New CF app deployment
Previous Message David Rowley 2015-02-27 06:23:26 Re: Performance improvement for joins where outer side is unique