Re: 'dml' value for log_statement

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 'dml' value for log_statement
Date: 2014-02-06 22:22:47
Message-ID: 1391725367522-5790925.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sawada Masahiko wrote
> Hi all,
>
> Attaching patch provides new value 'dml' for log_statement.
> Currently, The server logs modification statements AND data definition
> statements if log_statement is set 'mod'.
> So we need to set the 'all' value for log_statement and remove
> unnecessary information
> if we would like to log only DML.
>
> This patch allows the user to set in detail the setting.
> The server logs statement only when INSERT. UPDATE, DELETE and TRUNCATE
> statement are executed.
> ( same as 'mod' value which does not log the DDL)
>
> Comments?
>
> Regards,
>
> -------
> Sawada Masahiko

-1

I'm not fully versed on what log levels provide what data but if you care
about changes to data then "ALTER TABLE table" is just as important an
activity as "UPDATE table" so "mod" exhibits the recommended behavior and
"dml" provides something that should be of minimal value.

DML by itself has value since monitoring schema changes without worrying
about transient data updates is understandable. But a schema-change, by
definition, alters data.

Maybe further description of why you find "mod" unsatisfactory would be
helpful.

Though it is simple enough to just let people use their own judgement....

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/dml-value-for-log-statement-tp5790895p5790925.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Harris 2014-02-06 22:30:01 Re: Minor performance improvement in transition to external sort
Previous Message Jeremy Harris 2014-02-06 22:12:05 Re: Minor performance improvement in transition to external sort