Is there a log of the querys executed in Postgresql?

1

I have been using postgresql 9.3, I would like to know if there is any log of the querys executed, and if there is a way to activate it so that one is generated

    
asked by ALVARO ROBERTO BACARREZA ARZAB 07.10.2018 в 01:35
source

1 answer

1

It must be verified in the configuration file that the logs are active

logging_collector = on

log_directory = 'pg_log'

log_statement = 'all'

The last line prints all the queries executed in the log.

An example of the configuration with docker is in:

link

    
answered by 12.10.2018 / 08:03
source