Skip site navigation (1) Skip section navigation (2)

Re: pg_hba.conf caching

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-patches <pgsql-patches(at)postgreSQL(dot)org>
Subject: Re: pg_hba.conf caching
Date: 2001-07-23 21:35:34
Message-ID: 200107232135.f6NLZYf21603@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
> On Fri, Jul 20, 2001 at 08:31:02PM -0400, Bruce Momjian wrote:
> > Attached is a patch that caches the non-comment contents of pg_hba.conf
> > as a List of list of tokens.  It uses that to test each authentication
> 
>   Means it cached are tokens only (and it save lexical analyze for 
> postmaster children), and final parsing (syntax analyze) running always?
> 
>  If I'm right: why not store to memory some final structs with config 
> file content? And for example things like 'strcmp(token, "password")' 
> run only once during postmaster startup.

The patch will tokenize the file, discard comments, and store the tokens
as a List of Lists, one List per line.  We could go with data structures
and eliminate the strncmp of fixed strings and conversion of inet
addresses to  inet values but it doesn't seemw worth it.  Certainly, now
that the code is completed overhauled, doing something like that will be
easier.  The hba.c code clearly needed an overhaul anyway.

-- 
  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

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-07-23 21:37:52
Subject: Re: Improvement Linux startup script
Previous:From: Neil PadgettDate: 2001-07-23 18:44:51
Subject: Patch to allow multiple table locks in "Unison"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group