Re: Problem with reloading groups in pg_hba.conf

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with reloading groups in pg_hba.conf
Date: 2002-03-21 16:38:05
Message-ID: 200203211638.g2LGc5e28434@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2002-03-21 16:49:16 Re: Problem with reloading groups in pg_hba.conf
Previous Message Tom Lane 2002-03-21 16:31:58 Re: Problem with reloading groups in pg_hba.conf