I am not a postgress guru...
The docs say
Log lines should be preffixed with the timestamp in milliseconds, the process id, the user id and the database name. This uses to be the default in most distributions, and is translated to this setting in the configuration file:
I suspect it should work with the defaults... you will need to test.
BUT if you want more advanced like duration follow the docs
PostgreSQL server can be configured to log statements and their durations and this module is able to collect this information. To be able to correlate each duration with their statements, they must be logged in the same line. This happens when the following options are used:
log_duration = 'on'
log_statement = 'none'
log_min_duration_statement = 0
Setting a zero value in
log_min_duration_statementwill log all statements executed by a client. You probably want to configure it to a higher value, so it logs only slower statements. This value is configured in milliseconds.
When using
log_statementandlog_durationtogether, statements and durations are logged in different lines, and Filebeat is not able to correlate both values, for this reason it is recommended to disablelog_statement.