Re: Problem with reloading groups in pg_hba.conf - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Problem with reloading groups in pg_hba.conf
Date
Msg-id 200203211638.g2LGc5e28434@candle.pha.pa.us
Whole thread Raw
In response to Re: Problem with reloading groups in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problem with reloading groups in pg_hba.conf  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > The problem is when to retokenize pg_hba.conf after a new pg_group is
> > made.  Seems I can either force administrators to 'pg_ctl reload' to
> > update for group changes, or automatically retokenize pg_hba.conf every
> > time I update pg_group.
> 
> Why exactly are you looking to reinvent the wheel, rather than doing
> it the same way we currently handle pg_shadow updates?  Send the
> postmaster a signal when you modify the flat file, and it can reread
> the file on receipt of the signal.  See SendPostmasterSignal().

I am handling it like pg_shadow. The problem is that because I expand
pg_group inside the pg_hba tokens, I have to retokenize pg_hba.conf too
after pg_group changes.  I assumed we didn't want pg_hba.conf
retokenized on a password change and only on a pg_ctl reload.

My new code has a separate pg_group token list which is not expanded
into the pg_hba.conf token list and is traversed for every connection.

Is this the right way to go?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with reloading groups in pg_hba.conf
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Problem with reloading groups in pg_hba.conf