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

Поиск
Список
Период
Сортировка
Искать
От
Pavel Stehule
Тема
Re: Providing catalog view to pg_hba.conf file - Patch submission
Дата
Msg-id
CAFj8pRC61LW2pnZ0uHSct+qFeG67T6zE1jb4MMboRa05D3s8rg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Providing catalog view to pg_hba.conf file - Patch submission "Prabakaran, Vaishnavi" <vaishnavip@fast.au.fujitsu.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Magnus Hagander <magnus@hagander.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission "Prabakaran, Vaishnavi" <vaishnavip@fast.au.fujitsu.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission "Prabakaran, Vaishnavi" <vaishnavip@fast.au.fujitsu.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Magnus Hagander <magnus@hagander.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Tom Lane <tgl@sss.pgh.pa.us>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Tom Lane <tgl@sss.pgh.pa.us>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Tom Lane <tgl@sss.pgh.pa.us>
Re: Providing catalog view to pg_hba.conf file - Patch submission Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Amit Kapila <amit.kapila16@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Robert Haas <robertmhaas@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Amit Kapila <amit.kapila16@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Peter Eisentraut <peter_e@gmx.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Peter Eisentraut <peter_e@gmx.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Robert Haas <robertmhaas@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission "David G. Johnston" <david.g.johnston@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Robert Haas <robertmhaas@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission "David G. Johnston" <david.g.johnston@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Peter Eisentraut <peter_e@gmx.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Pavel Stehule <pavel.stehule@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Andres Freund <andres@anarazel.de>
Re: Providing catalog view to pg_hba.conf file - Patch submission Peter Eisentraut <peter_e@gmx.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Stephen Frost <sfrost@snowman.net>
Re: Providing catalog view to pg_hba.conf file - Patch submission Haribabu Kommi <kommi.haribabu@gmail.com>
Re: Providing catalog view to pg_hba.conf file - Patch submission Heikki Linnakangas <hlinnaka@iki.fi>
Re: Providing catalog view to pg_hba.conf file - Patch submission Greg Stark <stark@mit.edu>
Re: Providing catalog view to pg_hba.conf file - Patch submission Jaime Casanova <jaime@2ndquadrant.com>
Hi

It looks well, I have only one objection.

I am not sure so function "hba_settings" should be in file guc.c - it has zero relation to GUC.

Maybe hba.c file is better probably.

Other opinions?


2015-02-27 7:30 GMT+01:00 Haribabu Kommi <kommi.haribabu@gmail.com>:
On Sat, Feb 7, 2015 at 8:26 PM, Pavel Stehule <pavel.stehule@gmail.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.

your solution is ok, simply and clean. Performance for this view should not be critical and every time will be faster than login as root and searching pg_hba.conf

Regards

Pavel
 

Updated patch is attached. comments?

Regards,
Hari Babu
Fujitsu Australia

В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
Сообщение: Re: Docs about shared memory
От: Robert Haas
Дата:
FAQ