I have the following setting in my postgresql.conf
log_statement='all' log_duration=on
When I run psql and run any query like select / create user / etc, it registers the statement as well as the duration. If I give a request to connect to another database
\c <database_name>
it records neither duration nor operator. I thought this might not be a duration and operator log for meta commands that start with a backslash. But for some of them, it writes the operator and duration, for example \dt
\l
.
I think there may be a list of queries / commands for which a log will be created or not. is there such a list?
Having said that, the original question that made me dig it -
My application (golang-react application) interacts with the postgresql and logs operator and its duration. But after that he registers two more durations, the statement of which is not printed. (I commented on log_min_duration_statement
), so I'm not sure what requests are for this duration. Also, if I do a SELECT query,xact_start,query_start FROM pg_stat_activity;
at that time, to see running requests, it does not display any other requests, except for those that I see in the logs.
How do I know for which requests this duration is?
source share