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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: 2015-02-27 19:04:37
Message-ID: CAFj8pRD0GmDAf-4M8U=JyuDRUn5n1W3HCbL2oaKDbasLKwU4zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-02-27 19:32 GMT+01:00 Stephen Frost <sfrost(at)snowman(dot)net>:

> * Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
> > 2015-02-27 17:59 GMT+01:00 Stephen Frost <sfrost(at)snowman(dot)net>:
> > > I don't think we actually care what the "current contents" are from the
> > > backend's point of view- after all, when does an individual backend
> ever
> > > use the contents of pg_hba.conf after it's up and running? What would
> > > make sense, to me at least, would be:
> > >
> > > pg_hba_configured() -- spits back whatever the config file has
> > > pg_hba_active() -- shows what the postmaster is using currently
> >
> > I disagree and I dislike this direction. It is looks like over
> engineering.
> >
> > * load every time is wrong, because you will see possibly not active
> data.
>
> That's the point of the two functions- one to give you what a reload
> *now* would, and one to see what's currently active.
>

> > * ignore reload is a attack to mental health of our users.
>
> Huh?
>

this topic should be divided, please. One part - functions for loading
pg_hba and translating to some table. Can be two, can be one with one
parameter. It will be used probably by advanced user, and I am able to
accept it like you or Tomas proposed. Second part is the content of view
pg_hba_conf. It should be only one and should to view a active content. I
mean a content that is actively used - when other session is started. I am
strongly against the behave, when I have to close session to refresh a
content of this view (after reload) - and I am against to see there not
active content.

Regards

Pavel

>
> > It should to work like "pg_settings". I need to see "what is wrong in
> this
> > moment" in pg_hba.conf, not what was or what will be wrong.
>
> That's what pg_hba_active() would be from above, yes.
>
> > We can load any config files via admin contrib module - so there is not
> > necessary repeat same functionality
>
> That's hardly the same- I can't (easily, anyway) join the results of
> pg_read() to pg_hba_active() and see what's different or the same.
>
> Thanks,
>
> Stephen
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-02-27 19:09:15 Re: logical column ordering
Previous Message Marc Cousin 2015-02-27 19:01:02 Re: star schema and the optimizer