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

From Bruce Momjian
Subject Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)
Date
Msg-id 200209260207.g8Q27HT25569@candle.pha.pa.us
Whole thread Raw
In response to postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: postmaster -d option (was Re: [GENERAL] Relation 0 does not exist)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> > ... I was running postmaster -d4, yet the only
> > query I saw was the last LOG one. I pretty sure that I would see all queries
> > with -d3 before..
>
> It looked to me like you were just running with the recently-added
> frill to log only queries that cause errors; which is on by default.
>
> (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.  There was a comment in one that said
client_min_messages but I just fixed that.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/tcop/postgres.c,v
retrieving revision 1.294
diff -c -c -r1.294 postgres.c
*** src/backend/tcop/postgres.c    25 Sep 2002 20:31:40 -0000    1.294
--- src/backend/tcop/postgres.c    26 Sep 2002 01:57:48 -0000
***************
*** 1258,1267 ****
                          sprintf(debugstr, "debug%s", optarg);
                          SetConfigOption("server_min_messages", debugstr, ctx, gucsource);
                          pfree(debugstr);
-
                          /*
                           * -d is not the same as setting
!                          * client_min_messages because it enables other
                           * output options.
                           */
                          if (atoi(optarg) >= 1)
--- 1258,1266 ----
                          sprintf(debugstr, "debug%s", optarg);
                          SetConfigOption("server_min_messages", debugstr, ctx, gucsource);
                          pfree(debugstr);
                          /*
                           * -d is not the same as setting
!                          * server_min_messages because it enables other
                           * output options.
                           */
                          if (atoi(optarg) >= 1)
***************
*** 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;

--- 1274,1279 ----

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug in PL/pgSQL GET DIAGNOSTICS?
Next
From: Bruce Momjian
Date:
Subject: Re: compiling client utils under win32 - current 7.3devel