@@ -355,6 +355,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params,
355355 params -> log_min_duration ))
356356 {
357357 StringInfoData buf ;
358+ char * msgfmt ;
358359
359360 TimestampDifference (starttime , endtime , & secs , & usecs );
360361
@@ -373,7 +374,11 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params,
373374 * emitting individual parts of the message when not applicable.
374375 */
375376 initStringInfo (& buf );
376- appendStringInfo (& buf , _ ("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n" ),
377+ if (aggressive )
378+ msgfmt = _ ("automatic aggressive vacuum of table \"%s.%s.%s\": index scans: %d\n" );
379+ else
380+ msgfmt = _ ("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n" );
381+ appendStringInfo (& buf , msgfmt ,
377382 get_database_name (MyDatabaseId ),
378383 get_namespace_name (RelationGetNamespace (onerel )),
379384 RelationGetRelationName (onerel ),
@@ -486,10 +491,16 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
486491 pg_rusage_init (& ru0 );
487492
488493 relname = RelationGetRelationName (onerel );
489- ereport (elevel ,
490- (errmsg ("vacuuming \"%s.%s\"" ,
491- get_namespace_name (RelationGetNamespace (onerel )),
492- relname )));
494+ if (aggressive )
495+ ereport (elevel ,
496+ (errmsg ("aggressively vacuuming \"%s.%s\"" ,
497+ get_namespace_name (RelationGetNamespace (onerel )),
498+ relname )));
499+ else
500+ ereport (elevel ,
501+ (errmsg ("vacuuming \"%s.%s\"" ,
502+ get_namespace_name (RelationGetNamespace (onerel )),
503+ relname )));
493504
494505 empty_pages = vacuumed_pages = 0 ;
495506 num_tuples = tups_vacuumed = nkeep = nunused = 0 ;
0 commit comments