snippetsqlModerate
How to disable the logging of parameter values in PostgreSQL
Viewed 0 times
postgresqlloggingthedisablehowvaluesparameter
Problem
Is there a way to disable the logging of the parameter values used in a query, while still logging the actual query itself?
I'd like to set
I'd really like to suppress the
Is it possible to disable this from within Postgres?
I'd like to set
log_min_duration_statement = 0 to use with pgBadger. I'm getting two lines per query like:LOG: Select * from table where id = $1
DETAIL: parameters: $1 = 55I'd really like to suppress the
DETAIL lines because it's bloating my logs and saving sensitive information.Is it possible to disable this from within Postgres?
Solution
You can set
The manual:
Controls the amount of detail written in the server log for each
message that is logged. Valid values are
each adding more fields to displayed messages.
logging of
Bold emphasis mine.
log_error_verbosity = TERSEThe manual:
Controls the amount of detail written in the server log for each
message that is logged. Valid values are
TERSE, DEFAULT, and VERBOSE,each adding more fields to displayed messages.
TERSE excludes thelogging of
DETAIL, HINT, QUERY, and CONTEXT error information.Bold emphasis mine.
Context
StackExchange Database Administrators Q#129924, answer score: 11
Revisions (0)
No revisions yet.