Thank you for the opinions.

At Tue, 29 Aug 2017 15:00:57 +0900, Masahiko Sawada <sawada.m...@gmail.com> 
wrote in <CAD21AoD76_QkYBwu8=numv0sp3dec9x+dufb6-xbqyuuuuh...@mail.gmail.com>
> On Tue, Aug 29, 2017 at 10:16 AM, Robert Haas <robertmh...@gmail.com> wrote:
> > On Mon, Aug 28, 2017 at 5:26 AM, Kyotaro HORIGUCHI
> > <horiguchi.kyot...@lab.ntt.co.jp> wrote:
> >> Currently the message shows the '%d skipped-frozen' message but
> >> it is insufficient to verify the true effect. This is a patch to
> >> show mode as 'aggressive' or 'normal' in the closing message of
> >> vacuum. %d frozen-skipped when 'aggressive mode' shows the true
> >> effect of ALL_FROZEN.
> >>
> >> I will add this patch to CF2017-09.
> >
> > I would be a bit inclined to somehow show aggressive if it's
> > aggressive and not insert anything at all otherwise.  That'd probably
> > require two separate translatable strings in each case, but maybe
> > that's OK.
> >
> > What do other people think?
> 
> FWIW I prefer the Robert's idea; not insert anything if normal vacuum.

Though the form is intending to simplify parsing of the message,
keeping the previous format if nothing special is convincing.

How about the followings?

"automatic [agressive ]vacuum of table \"%s..."
"[aggressive ]vacuuming \"%s..."

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
>From 8ced1199d69bd1f59bff9224cbdd62a7159d85ce Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horiguchi.kyot...@lab.ntt.co.jp>
Date: Mon, 28 Aug 2017 13:12:25 +0900
Subject: [PATCH] Show "aggressive" or not in vacuum messages

VACUUM VERBOSE or autovacuum emits log message with "%u skipped
frozen" but we cannot tell whether the vacuum was non-freezing (or not
aggressive) vacuum or freezing (or aggressive) vacuum having no tuple
to freeze. This patch adds indication of aggressive (auto)vacuum in
log messages and VACUUM VERBOSE message.
---
 src/backend/commands/vacuumlazy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 45b1859..472a43b 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -373,7 +373,8 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params,
 			 * emitting individual parts of the message when not applicable.
 			 */
 			initStringInfo(&buf);
-			appendStringInfo(&buf, _("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n"),
+			appendStringInfo(&buf, _("automatic %svacuum of table \"%s.%s.%s\": index scans: %d\n"),
+							 aggressive ? "aggressive " : "",
 							 get_database_name(MyDatabaseId),
 							 get_namespace_name(RelationGetNamespace(onerel)),
 							 RelationGetRelationName(onerel),
@@ -487,7 +488,8 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 
 	relname = RelationGetRelationName(onerel);
 	ereport(elevel,
-			(errmsg("vacuuming \"%s.%s\"",
+			(errmsg("%svacuuming \"%s.%s\"",
+					aggressive ? "aggressive " : "",
 					get_namespace_name(RelationGetNamespace(onerel)),
 					relname)));
 
-- 
2.9.2

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to