Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)
Date: 2002-09-26 03:55:56
Message-ID: 200209260355.g8Q3tut11972@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


Uh, yes, it is a little confusing and I am not sure that patch is right
anymore. I haven't applied it.

Another issue is that we used to have a global debug_level variable that was
propogated to the client. Now, we just have the GUC value which does
propogate like the global one did. Does the postmaster still pass -dX
down to the child like it used to? I don't see why you say, "The
postmaster.c code is blowing off all those considerations."

I -d0 think functions properly except that it sets the value to 'notice'
rather than resetting it to the postgresql.conf value. Is there a way
to do that?

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> (Looks at code...) Ah. It looks like -d to the postmaster no longer
> >> means anywhere near what it used to. Bruce --- compare the handling
> >> of -d in the backend (postgres.c lines 1251ff) with its handling in
> >> the postmaster (postmaster.c lines 444ff). Big difference. Are we
> >> going to make these more alike? If so, which one do we like?
>
> > I am sorry but I don't understand. They look like they both set
> > server_min_messages.
>
> Yeah, but postgres.c *also* sets log_connections, log_statement,
> debug_print_parse, debug_print_plan, debug_print_rewritten depending
> on the -d level. This behavior is not random; it's an attempt to
> reproduce the effects of the historical -d switch. The postmaster.c
> code is blowing off all those considerations.
>
> > *** 1275,1288 ****
> > if (atoi(optarg) >= 5)
> > SetConfigOption("debug_print_rewritten", "true", ctx, gucsource);
> > }
> > - else
> > -
> > - /*
> > - * -d 0 allows user to prevent postmaster debug
> > - * from propagating to backend.
> > - */
> > - SetConfigOption("server_min_messages", "notice",
> > - ctx, gucsource);
> > }
> > break;
>
> I think you are deleting your own code there ... why?
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-26 04:00:10 Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)
Previous Message Neil Conway 2002-09-26 03:40:17 Re: Prepared statement performance...

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-26 03:56:56 Re: compiling client utils under win32 - current 7.3devel
Previous Message Tom Lane 2002-09-26 03:28:19 Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)