Skip to content

Commit cc99c57

Browse files
committed
a small tweak to enable display in the log file
of database name before table name when VACUUMing or ANALYZing a table. Cosimo Streppone
1 parent c5c1cc3 commit cc99c57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/pg_autovacuum/pg_autovacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Revisions by Christopher B. Browne, Liberty RMS
55
* Win32 Service code added by Dave Page
66
*
7-
* $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.33 2005/05/11 17:57:56 momjian Exp $
7+
* $PostgreSQL: pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v 1.34 2005/05/11 18:07:14 momjian Exp $
88
*/
99

1010
#include "postgres_fe.h"
@@ -1056,9 +1056,9 @@ perform_maintenance_command(db_info * dbi, tbl_info * tbl, int operation)
10561056
*/
10571057
if ((tbl->relisshared > 0 && strcmp("template1", dbi->dbname) != 0) ||
10581058
(operation == ANALYZE_ONLY))
1059-
snprintf(buf, sizeof(buf), "ANALYZE %s", tbl->table_name);
1059+
snprintf(buf, sizeof(buf), "ANALYZE %s.%s", dbi->dbname, tbl->table_name);
10601060
else if (operation == VACUUM_ANALYZE)
1061-
snprintf(buf, sizeof(buf), "VACUUM ANALYZE %s", tbl->table_name);
1061+
snprintf(buf, sizeof(buf), "VACUUM ANALYZE %s.%s", dbi->dbname, tbl->table_name);
10621062
else
10631063
return;
10641064

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy