Re: How to log 'user time' in postgres logs
От | Adrian Klaver |
---|---|
Тема | Re: How to log 'user time' in postgres logs |
Дата | |
Msg-id | 3bdfc324-c1fe-6ac6-1584-0e21ad4891e9@aklaver.com обсуждение исходный текст |
Ответ на | Re: How to log 'user time' in postgres logs (francis picabia <fpicabia@gmail.com>) |
Список | pgsql-general |
On 8/28/19 11:36 AM, francis picabia wrote: > > > The other possibility was it just didn't log the slower times, but I > have seen larger numbers > in the 10,000 ms range in the night when some backups and housekeeping > happens. > > All log related settings: > checkpoint_segments = 12 > logging_collector = on > log_destination = 'stderr' > log_directory = 'pg_log' > log_filename = 'postgresql-%a.log' > log_truncate_on_rotation = on > log_rotation_age = 1440 > log_rotation_size = 0 > log_min_messages = info > log_min_error_statement = debug1 > log_duration = on > log_line_prefix = '<%t>' You might also want to log: log_connections = on log_disconnections = on And add to log_line_prefix some mix of: %u User name %p Process ID %s Process start time stamp > > I know it does sound strange, but this is what we battled with for 2.5 > days until the light > came on that the vacuum had been set to off on the target system during > server migration. > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: