Re: [PATCH] Patch to make pg_hba.conf handle virtualhost access control and samehost keyword - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [PATCH] Patch to make pg_hba.conf handle virtualhost access control and samehost keyword
Date
Msg-id 200107112219.f6BMJVi03002@candle.pha.pa.us
Whole thread Raw
In response to RE: [PATCH] Patch to make pg_hba.conf handle virtualhost access control and samehost keyword  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-patches
> > > Maybe it should be cached in memory and only be re-read on request
> > > (SIGHUP).  Parsing that file every time is undoubtedly a large
> > fraction of
> > > the total connection startup time.
> >
> > Okay with me if someone wants to do it ... but that'd be a lot more work
> > than just moving the documentation ...
>
> Or cache the information and just do a file modification timestamp check on
> each connection to see if it needs to be reread.  (Best of both worlds??)

Rather than having to create data structures for the complex pg_hba.conf
format, I am going to do a quick-and-dirty and load the non-comment
lines into a List of strings and have the postmaster read that.  It will
reload from the file on sighup, just like we do for postgresql.conf.

--
  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, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: encode in base code
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] [PATCH] Re: Setuid functions