logging statement levels - Mailing list pgsql-hackers

From Andrew Dunstan
Subject logging statement levels
Date
Msg-id 3FF9DAE5.9010405@dunslane.net
Whole thread Raw
In response to TODO list  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: logging statement levels  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
I wrote:

>
>
> If nobody is working on this I am prepared to look at it:
>
> . Allow logging of only data definition(DDL), or DDL and modification 
> statements
>



Here are some options:

1. change the type of "log_statement" option from boolean to string, 
with allowed values of "all, mod, ddl, none" with default "none".
2. same as 1. but make boolean true values synonyms for "all" and 
boolean false values synonyms for "none".
3. keep "log_statement" option as now and add a new option 
"log_statement_level" with the same options as 1. but default to "all", 
which will have no effect unless "log_statement" is true.

Also, I assume "modification statements" means insert/update/delete, or 
are we talking about DDL mods (like "alter table")?

Finally, what about functions that have side effects? It would be nice 
to be able to detect the statements to be logged at the syntactic level, 
but it strikes me that that might not be possible.

cheers

andrew






pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: PL/Java issues
Next
From: Steven Vajdic
Date:
Subject: UNSUBSCRIBE