log_autovacuum_min_duration doesn't log VACUUMs

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: log_autovacuum_min_duration doesn't log VACUUMs
Date: 2017-02-10 08:38:26
Message-ID: CANP8+jJVPemfsHSgZUBfCAcdfO6-jdSpWf08tgkm=jSknohGVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I guess its fairly obvious in the title, but
log_autovacuum_min_duration doesn't log VACUUMs only autovacuums.

What isn't obvious is why that restruction is useful.

I say that it would be helpful to log all kinds of VACUUM, so we get
similar output from all methods of submission.

So, changes would be

1. Allow logging whether or not it is an autovacuum (attached)

2. Change name of parameter to ...
a) log_vacuum_min_duration
b) log_maintenance_min_duration and have it log CLUSTER, CREATE INDEX etc also
c) log_ddl_min_duration and just time any DDL that takes a long time
We could do any of those and they are all about as easy as one
another, though the last one will be a bigger patch, so a) might be
simpler.

The following patch implements (1), but not yet (2) to allow debate.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
all_vacuums_log_min_duration.v1.patch application/octet-stream 924 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kuntal Ghosh 2017-02-10 09:24:48 Re: Passing query string to workers
Previous Message Simon Riggs 2017-02-10 08:30:18 Reporting xmin from VACUUMs