Skip to content

Commit e6df063

Browse files
committed
Dept of second thoughts: recursive case in ANALYZE shouldn't emit a
pgstats message. This might need to be done differently later, but with the current logic that's what should happen.
1 parent 48c192c commit e6df063

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/backend/commands/analyze.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.145 2009/12/30 20:32:14 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.146 2009/12/30 21:21:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -565,9 +565,12 @@ do_analyze_rel(Relation onerel, VacuumStmt *vacstmt,
565565
/*
566566
* Report ANALYZE to the stats collector, too; likewise, tell it to
567567
* adopt these numbers only if we're not inside a VACUUM that got a
568-
* better number.
568+
* better number. However, a call with inh = true shouldn't reset
569+
* the stats.
569570
*/
570-
pgstat_report_analyze(onerel, update_reltuples, totalrows, totaldeadrows);
571+
if (!inh)
572+
pgstat_report_analyze(onerel, update_reltuples,
573+
totalrows, totaldeadrows);
571574

572575
/* We skip to here if there were no analyzable columns */
573576
cleanup:

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