After loooong pause, adding next (well, second) post to the “series“. This time, I'd like to describe how logging works. And I don't mean binary logging (WAL), but the log for us, humans, to read.
Before I will go to the postgresql.conf options, let me first describe what happens when PostgreSQL wants to log something.
Continue reading Understanding postgresql.conf : log*
One of the questions that pop up frequently on IRC is how to see queries are now executed on the server, and what queries were earlier.
Theoretically answer to this is simple – pg_stat_activity and log_min_duration_statement. Or log_statement. What is the difference? That's exactly why I'm writing this post.
Continue reading Logging queries – how?