Обсуждение: log_statements = mod or all

Поиск
Список
Период
Сортировка

log_statements = mod or all

От
fatih ozturk
Дата:
Hi

In  http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html
log_statement explained as

"
log_statement (string)

Controls which SQL statements are logged. Valid values are none, ddl, mod, and all. ddl logs all data definition statements, such as CREATE, ALTER, and DROP statements. mod logs all ddl statements, plus data-modifying statements such as INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM. PREPARE, EXECUTE, and EXPLAIN ANALYZE statements are also logged if their contained command is of an appropriate type. For clients using extended query protocol, logging occurs when an Execute message is received, and values of the Bind parameters are included (with any embedded single-quote marks doubled).

The default is none. Only superusers can change this setting.

Note: Statements that contain simple syntax errors are not logged even by the log_statement = all setting, because the log message is emitted only after basic parsing has been done to determine the statement type. In the case of extended query protocol, this setting likewise does not log statements that fail before the Execute phase (i.e., during parse analysis or planning). Set log_min_error_statement to ERROR (or lower) to log such statements.

"
Problem is i dont understand the difference between log_statement='all' and log_statement='mod'?

Am i missing something?

Thanks for your interest

Re: log_statements = mod or all

От
Fujii Masao
Дата:
Hi,

On Thu, Apr 9, 2009 at 5:15 PM, fatih ozturk <ozturkfa@yahoo.com> wrote:
> Problem is i dont understand the difference between log_statement='all' and
> log_statement='mod'?

AFAIK, 'mod' doesn't log utility commands, such as CHECKPOINT and VACUUM.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Re: log_statements = mod or all

От
Guillaume Lelarge
Дата:
Le jeudi 09 avril 2009 à 11:02:24, Fujii Masao a écrit :
> Hi,
>
> On Thu, Apr 9, 2009 at 5:15 PM, fatih ozturk <ozturkfa@yahoo.com> wrote:
> > Problem is i dont understand the difference between log_statement='all'
> > and log_statement='mod'?
>
> AFAIK, 'mod' doesn't log utility commands, such as CHECKPOINT and VACUUM.
>

And SELECT.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: log_statements = mod or all

От
fatih ozturk
Дата:

Thanks for your answers.

Fatih Öztürk

--- On Thu, 4/9/09, Guillaume Lelarge <guillaume@lelarge.info> wrote:

From: Guillaume Lelarge <guillaume@lelarge.info>
Subject: Re: [ADMIN] log_statements = mod or all
To: pgsql-admin@postgresql.org
Cc: "Fujii Masao" <masao.fujii@gmail.com>, ozturkfa@yahoo.com
Date: Thursday, April 9, 2009, 12:30 PM

Le jeudi 09 avril 2009 à 11:02:24, Fujii Masao a écrit :
> Hi,
>
> On Thu, Apr 9, 2009 at 5:15 PM, fatih ozturk <ozturkfa@yahoo.com> wrote:
> > Problem is i dont understand the difference between log_statement='all'
> > and log_statement='mod'?
>
> AFAIK, 'mod' doesn't log utility commands, such as CHECKPOINT and VACUUM.
>

And SELECT.


--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com