Skip to content

Commit 85dfe37

Browse files
committed
Ratchet up patch to improve autovacuum wraparound messages.
Simon Riggs
1 parent 11c794f commit 85dfe37

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/backend/postmaster/autovacuum.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*
5656
*
5757
* IDENTIFICATION
58-
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.82 2008/07/21 15:27:02 alvherre Exp $
58+
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.83 2008/07/23 20:20:10 alvherre Exp $
5959
*
6060
*-------------------------------------------------------------------------
6161
*/
@@ -2650,16 +2650,15 @@ autovacuum_do_vac_analyze(autovac_table *tab,
26502650
static void
26512651
autovac_report_activity(autovac_table *tab)
26522652
{
2653-
#define MAX_AUTOVAC_ACTIV_LEN (NAMEDATALEN * 2 + 32)
2653+
#define MAX_AUTOVAC_ACTIV_LEN (NAMEDATALEN * 2 + 56)
26542654
char activity[MAX_AUTOVAC_ACTIV_LEN];
26552655
int len;
26562656

26572657
/* Report the command and possible options */
26582658
if (tab->at_dovacuum)
26592659
snprintf(activity, MAX_AUTOVAC_ACTIV_LEN,
2660-
"autovacuum: VACUUM%s%s",
2661-
tab->at_doanalyze ? " ANALYZE" : "",
2662-
tab->at_wraparound ? " (to prevent wraparound)" : "");
2660+
"autovacuum: VACUUM%s",
2661+
tab->at_doanalyze ? " ANALYZE" : "");
26632662
else
26642663
snprintf(activity, MAX_AUTOVAC_ACTIV_LEN,
26652664
"autovacuum: ANALYZE");
@@ -2670,7 +2669,8 @@ autovac_report_activity(autovac_table *tab)
26702669
len = strlen(activity);
26712670

26722671
snprintf(activity + len, MAX_AUTOVAC_ACTIV_LEN - len,
2673-
" %s.%s", tab->at_nspname, tab->at_relname);
2672+
" %s.%s%s", tab->at_nspname, tab->at_relname,
2673+
tab->at_wraparound ? " (to prevent wraparound)" : "");
26742674

26752675
/* Set statement_timestamp() to current time for pg_stat_activity */
26762676
SetCurrentStatementStartTimestamp();

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