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

Re: reset all update

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: reset all update
Date: 2001-06-12 20:03:10
Message-ID: 20010612220310.A27794@l-t.ee (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, Jun 12, 2001 at 09:37:43PM +0200, Peter Eisentraut wrote:
> Marko Kreen writes:
> > *** src/backend/tcop/postgres.c	2001/06/07 04:50:57	1.219
> > --- src/backend/tcop/postgres.c	2001/06/11 09:17:07
> > + 	ctx = IsUnderPostmaster ? PGC_BACKEND : PGC_POSTMASTER;
> > +
> 
> This is wrong.  If you're in PostgresMain then the context is PGC_BACKEND
> -- by definition.

Well, but how do you explain this: (line 1463 in current CVS):

         /* all options are allowed if not under postmaster */
         SetConfigOption(name, value,
            (IsUnderPostmaster) ? PGC_BACKEND : PGC_POSTMASTER, true);

As I understand, when you run ./postgres directly, you get
PGC_POSTMASTER, which includes PGC_BACKEND.

And sorry, I should have updated that check to 'ctx' too, it
would have been clearer.

> > ! 		if (!cf->variable || !cf->default_val)
> > ! 			continue;
> 
> This shouldn't happen.  Just let it crash.
> 
> > !
> > ! 		if (!*cf->variable || strcmp(cf->default_val, *cf->variable))
> 
> Evil coding style alert.  Suggest:

Ok, will send a update to that, waiting first your
comment on the ctx issue.


-- 
marko


In response to

Responses

pgsql-patches by date

Next:From: Peter EisentrautDate: 2001-06-12 20:05:29
Subject: Re: reset all update
Previous:From: Peter EisentrautDate: 2001-06-12 20:02:52
Subject: Re: Patch to include PAM support...

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