Turn on the server log:
log_statement = all
This will log every call to the database server.
I would not use log_statement = all
on a production server. Produces huge log files.
The manual about logging-parameters:
log_statement
(enum
)
Controls which SQL statements are logged. Valid values are none
(off), ddl
, mod
, and all
(all statements). [...]
Resetting the log_statement
parameter requires a server reload (SIGHUP
). A restart is not necessary. Read the manual on how to set parameters.
Don't confuse the server log with pgAdmin's log. Two different things!
You can also look at the server log files in pgAdmin, if you have access to the files (may not be the case with a remote server) and set it up correctly. In pgadmin III, have a look at: Tools -> Server status
. That option was removed in pgadmin4.
I prefer to read the server log files with vim
(or any editor / reader of your choice).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…