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

Re: pgsql-server/src backend/main/main.c backend/p ...

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql-server/src backend/main/main.c backend/p ...
Date: 2004-05-19 07:59:11
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE171695@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-committers
> > > Yes, it probably is bad, but I am not sure how frequently 
> this will 
> > > happen, _and_ I need to set my_exec_path very far up in 
> the tree to 
> > > the timezone stuff knows the location, hence the fact that elog() 
> > > calls wouldn't work at all anyway, I think.
> > 
> > Perhaps the timezone stuff is what needs to be moved.  I'd be 
> > surprised if there aren't eventually elog calls in src/timezone, so 
> > thinking that timezone must work before elog does seems backwards.
> 
> Magnus says the timezone stuff is being called somewhere he 
> can't find, perhaps in some underlying library.  Anyway, we 
> can easily switch back to elog.  It does have to get this 
> info before processing GUC for sure.

Um. Not quite.
It certainly cannot be called from a *library* function. All our
functions are (in my new patch coming up) prefixed with pg_, so they'er
not called from a library.
But they are called very early at some point. In postmaster.c it worked
fine as it was, but in postgres.c it got called before it had
my_exec_path, and thus failed to find it's own libarry directory. 

AFAIK the only ereport() or elog() in the timezone code is in
pg_timezone_initialize() (new function), and that one is called at a
fixed location after we have loaded the config file and thus have elog.

The main issue being that before we load the config file, we don't know
where to put our output, so it's not much point in doing it. 

//Magnus


pgsql-committers by date

Next:From: Magnus HaganderDate: 2004-05-19 08:06:09
Subject: Re: pgsql-server/src backend/main/main.c backend/p ...
Previous:From: Bruce MomjianDate: 2004-05-19 05:20:27
Subject: pgsql-server/src/test/regress pg_regress.sh

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