Thread
Commits
-
Improve autovacuum logging for aggressive and anti-wraparound runs
- 28a8fa984c63 12.0 landed
-
Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Sergei Kornilov <sk@zsrv.org> — 2018-07-21T06:38:38Z
Hello Currently log_autovacuum_min_duration log message has no difference between regular autovacuum and to prevent wraparound autovacuum. There are important differences, for example, backend can automatically cancel regular autovacuum, but not anti-wraparound. I think it is useful indicate anti-wraparound in logs. Small patch attached. I am not sure can be anti-wraparound autovacuum not aggressive, so i leave all 4 variants. regards, Sergei
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Michael Paquier <michael@paquier.xyz> — 2018-07-21T08:22:50Z
On Sat, Jul 21, 2018 at 09:38:38AM +0300, Sergei Kornilov wrote: > Currently log_autovacuum_min_duration log message has no difference > between regular autovacuum and to prevent wraparound autovacuum. There > are important differences, for example, backend can automatically > cancel regular autovacuum, but not anti-wraparound. I think it is > useful indicate anti-wraparound in logs. Yes, a bit more verbosity would be nice for that. Using the term "anti-wraparound" directly in the logs makes the most sense? > Small patch attached. I am not sure can be anti-wraparound autovacuum > not aggressive, so i leave all 4 variants. The patch could be made simpler by using empty strings with a single ereport() call. -- Michael
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Sergei Kornilov <sk@zsrv.org> — 2018-07-21T09:26:06Z
Hello > Yes, a bit more verbosity would be nice for that. Using the term > "anti-wraparound" directly in the logs makes the most sense? I used "(to prevent wraparound)" to looks like reporting in pg_stat_activity. As far i can see currently we not using "anti-wraparound" for user messages. On the other hand we using anti-wraparound in docs, so i can change wording. > The patch could be made simpler by using empty strings with a single > ereport() call. How about proper translate in this case? Currently we translate full line "automatic vacuum of table \"%s.%s.%s\": index scans: %d\n" before ereport call. regards, Sergei
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Robert Haas <robertmhaas@gmail.com> — 2018-07-23T14:36:25Z
On Sat, Jul 21, 2018 at 4:22 AM, Michael Paquier <michael@paquier.xyz> wrote: > On Sat, Jul 21, 2018 at 09:38:38AM +0300, Sergei Kornilov wrote: >> Currently log_autovacuum_min_duration log message has no difference >> between regular autovacuum and to prevent wraparound autovacuum. There >> are important differences, for example, backend can automatically >> cancel regular autovacuum, but not anti-wraparound. I think it is >> useful indicate anti-wraparound in logs. > > Yes, a bit more verbosity would be nice for that. Using the term > "anti-wraparound" directly in the logs makes the most sense? I'm not particularly in love with that terminology. I doubt that it's very clear to the average user. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Masahiko Sawada <sawada.mshk@gmail.com> — 2018-07-24T09:02:00Z
On Sat, Jul 21, 2018 at 6:26 PM, Sergei Kornilov <sk@zsrv.org> wrote: > Hello > >> Yes, a bit more verbosity would be nice for that. Using the term >> "anti-wraparound" directly in the logs makes the most sense? > I used "(to prevent wraparound)" to looks like reporting in pg_stat_activity. As far i can see currently we not using "anti-wraparound" for user messages. > On the other hand we using anti-wraparound in docs, so i can change wording. +1 for "to prevent wraparound". > >> The patch could be made simpler by using empty strings with a single >> ereport() call. > How about proper translate in this case? Currently we translate full line "automatic vacuum of table \"%s.%s.%s\": index scans: %d\n" before ereport call. > Yeah, for translation I think it's better to make full lines. When we added "aggressive" to autovacuum logs (commit b55509) we've done the same thing. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Michael Paquier <michael@paquier.xyz> — 2018-07-24T11:25:04Z
On Tue, Jul 24, 2018 at 06:02:00PM +0900, Masahiko Sawada wrote: > Yeah, for translation I think it's better to make full lines. When we > added "aggressive" to autovacuum logs (commit b55509) we've done the > same thing. I am wondering if it would easier to add an extra line in the output, like "Options: aggressive, wraparound prevention" or such... -- Michael
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Masahiko Sawada <sawada.mshk@gmail.com> — 2018-09-12T08:36:31Z
On Tue, Jul 24, 2018 at 8:25 PM, Michael Paquier <michael@paquier.xyz> wrote: > On Tue, Jul 24, 2018 at 06:02:00PM +0900, Masahiko Sawada wrote: >> Yeah, for translation I think it's better to make full lines. When we >> added "aggressive" to autovacuum logs (commit b55509) we've done the >> same thing. > > I am wondering if it would easier to add an extra line in the output, > like "Options: aggressive, wraparound prevention" or such... It would be useful if we have a number of the options autovacuum workers could use but since there are only 2 I'm not sure we need the list-style. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Michael Paquier <michael@paquier.xyz> — 2018-09-13T03:58:14Z
On Wed, Sep 12, 2018 at 05:36:31PM +0900, Masahiko Sawada wrote: > It would be useful if we have a number of the options autovacuum > workers could use but since there are only 2 I'm not sure we need the > list-style. Looking at what Sergei has proposed upthread again, using a comma-separated list of options may be more painful for translators as such lists really depend on the language, so I would be fine to commit what has been added. One last point though: we use anti-wraparound in already five places in the docs, still I have sympathy for "to prevent wraparound" as well. The brackets look rather useless to me, wouldn't it be better to remove them? By doing so the longest message becomes: "automatic aggressive vacuum to prevent wraparound of table blah.blah" -- Michael
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Sergei Kornilov <sk@zsrv.org> — 2018-09-13T09:00:49Z
Hello > The brackets look rather useless to me, wouldn't it be better to remove > them? By doing so the longest message becomes: > "automatic aggressive vacuum to prevent wraparound of table blah.blah" Hmm, > 2018-09-13 11:48:09.303 MSK 6994 @ from [vxid:6/713 txid:0] [] LOG: automatic aggressive vacuum (to prevent wraparound) of table "template0.pg_toast.pg_toast_12252": index scans: 0 or > 2018-09-13 11:54:55.095 MSK 10115 @ from [vxid:3/100278 txid:0] [] LOG: automatic aggressive vacuum to prevent wraparound of table "template0.pg_toast.pg_toast_12252": index scans: 0 Looks better for me. Updated patch attached. regards, Sergei
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Michael Paquier <michael@paquier.xyz> — 2018-09-13T22:39:48Z
On Thu, Sep 13, 2018 at 12:00:49PM +0300, Sergei Kornilov wrote: > Looks better for me. Updated patch attached. Thanks Sergei for the new version, pushed. -- Michael
-
Re: Indicate anti-wraparound autovacuum in log_autovacuum_min_duration
Sergei Kornilov <sk@zsrv.org> — 2018-09-14T07:00:43Z
> Thanks Sergei for the new version, pushed. Thank you! regards, Sergei