Re: best method of reloading pg_hba.conf - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: best method of reloading pg_hba.conf
Date
Msg-id 3BED27EF.BD6804C1@tm.ee
Whole thread Raw
In response to Re: best method of reloading pg_hba.conf  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Fernando Nasser wrote:
> 
> Bruce Momjian wrote:
> >
> > > > Performance.  Peter E found that considerable startup time was being
> > > > wasted reading the file.
> > >
> > > But can't we read it only when needed ?
> > >
> > > Just stat'ing it should be much cheaper than reading it each time.
> >
> > We thought about that but it seems we could be reading partial writes to
> > the file.  This way the administrator controls when the changes become
> > effective.

You could do the writing in a proper way - write to temp file and then
rename.

> Hannu,
> 
> It is not only much safer (you get a 2nd chance to check what you've
> done)
> but is also consistent with the behavior of other Unix daemons.

Well, that much I already knew ;)

Except for sendmail where I must run newaliases, that is.


Sending a HUP is actually ok with me, it just came as a surprise.

----------------------
Hannu


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: RelationFlushRelation() or RelationClearRelation()
Next
From: Jean-Michel POURE
Date:
Subject: Diff/Patch integration -> SQL cvs clone