postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Change default logging level

Open inian opened this issue 3 years ago • 3 comments

It will be useful to have more detailed logging

Explore the following parameters

  • log_statement
  • log_min_messages
  • log_connections

inian avatar May 18 '21 15:05 inian

for project pausing I think log_connections would be enough for me if it works as expected

also we probably want to enable log rotation from postgresql.conf

are there any other use cases you're thinking of for logging @inian ?

awalias avatar May 18 '21 15:05 awalias

In general for debugging issues and exposing them in the dashboard, it will be useful to have a higher logging level. Was debugging one or two issues with @steve-chavez where we were wishing for greater visibility into what was happening.

inian avatar May 18 '21 16:05 inian

Yes, I remember we wanted to see the prepared statement parameters of some SELECT queries(SELECT.. WHERE id = $param) that failed with weird errors(somehow the parameters where not being passed fully). We managed to debug this with Kong logs though - they showed the parameters on the request query string.

For that we would require a log_statement=all. Not sure if it's totally worth it because logs get huge fast.

steve-chavez avatar May 19 '21 02:05 steve-chavez

log_statement=all to me seems an overkill and will generate very big and detailed logs. But it may be useful to log DDL operations only as they are not often i.e. log_statement=ddl

pashkinelfe avatar Jan 20 '23 08:01 pashkinelfe

Seems as though it's not hard to implement this the discussion stalled for 2 years. So let's leave logging level unchanged until it's needed for something actual.

pashkinelfe avatar Jan 23 '23 10:01 pashkinelfe