Migration of log features from 7.4 to 8.0

Started by Szűcs Gáborover 21 years ago2 messagespatches
Jump to latest
#1Szűcs Gábor
surrano@gmail.com

Dear Gurus,

Please show me to the right manual/discussion if my questions are already
answered/solved.

1. DEBUG message level separation:

In v7.3 there were the annoying DEBUG messages Start/CloseTransactCommand.
In v7.4 you could eliminate them from user DEBUG messages by logging from
DEBUG2 level.
In v8.0.0rc4, they are back at DEBUG2 level.

Is there a way to eliminate them AND keep user DEBUG messages (i.e.
plpgsql's "RAISE DEBUG")

2. CONTEXTs and HINTs

Looked up all the lines in postgresql.conf, but couldn't find the one to
turn CONTEXT and HINT lines after notices or errors. They proved to be very
useful, but can't make them be logged in v8. Is there a way?

3. redirect_stderr bogus?

Activating redirect_stderr, setting log_dir, log_file and all the rotate
params, it looked to me that all output the logger produced were 'db system
ready' and 'shut down', and not even these lines appeared in the log file.
May it be a bug, or simply the fact that a nonempty file already existed
(from redirected stdout, as described above)<

TIA,
--
G.

#2Bruce Momjian
bruce@momjian.us
In reply to: Szűcs Gábor (#1)
Re: [ADMIN] Migration of log features from 7.4 to 8.0

Sz���cs G���bor wrote:

Dear Gurus,

Please show me to the right manual/discussion if my questions are already
answered/solved.

1. DEBUG message level separation:

In v7.3 there were the annoying DEBUG messages Start/CloseTransactCommand.
In v7.4 you could eliminate them from user DEBUG messages by logging from
DEBUG2 level.
In v8.0.0rc4, they are back at DEBUG2 level.

Is there a way to eliminate them AND keep user DEBUG messages (i.e.
plpgsql's "RAISE DEBUG")

I looked at the plpgsql code and saw this:

| K_DEBUG
{
$$ = DEBUG2;
}

I think that should be DEBUG1. This was pushed to DEBUG2 from DEBUG1 in
7.4 because we moved GUC debug output from LOG to DEBUG1:

date: 2003/05/27 17:49:47; author: momjian; state: Exp; lines: +2 -2
Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.

I think because this is a plpgsql-specified output of DEBUG it makes
sense it should be DEBUG1 too.

The attached patch moves a plpgsql DEBUG to DEBUG1. It also fixes a few
place where DEBUG1 usage has crept in that should be DEBUG2. This will
be in 8.1

2. CONTEXTs and HINTs

Looked up all the lines in postgresql.conf, but couldn't find the one to
turn CONTEXT and HINT lines after notices or errors. They proved to be very
useful, but can't make them be logged in v8. Is there a way?

Sure:

log_error_verbosity = default # terse, default, or verbose messages

3. redirect_stderr bogus?

Activating redirect_stderr, setting log_dir, log_file and all the rotate
params, it looked to me that all output the logger produced were 'db system
ready' and 'shut down', and not even these lines appeared in the log file.
May it be a bug, or simply the fact that a nonempty file already existed
(from redirected stdout, as described above)<

Sorry, I am confused on how to answer this.

-- 
  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

Attachments:

/bjm/difftext/plainDownload+10-10