Skip to content

Commit 8ff2005

Browse files
committed
Message in the other exit from acquire_sample_rows(), as per update
from Mark Kirkwood. Also show the sample size.
1 parent 47c7f9e commit 8ff2005

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/backend/commands/analyze.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.61 2003/09/11 22:59:28 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.62 2003/09/11 23:12:31 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -539,6 +539,12 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
539539
if (!HeapTupleIsValid(tuple))
540540
{
541541
*totalrows = (double) numrows;
542+
543+
ereport(elevel,
544+
(errmsg("\"%s\": %u pages, %d rows sampled, %.0f estimated total rows",
545+
RelationGetRelationName(onerel),
546+
onerel->rd_nblocks, numrows, *totalrows)));
547+
542548
return numrows;
543549
}
544550

@@ -691,9 +697,9 @@ pageloop:;
691697
* Emit some interesting relation info
692698
*/
693699
ereport(elevel,
694-
(errmsg("\"%s\": %u pages, %.1f average rows/page in sample, %.0f estimated rows",
700+
(errmsg("\"%s\": %u pages, %d rows sampled, %.0f estimated total rows",
695701
RelationGetRelationName(onerel),
696-
onerel->rd_nblocks, tuplesperpage, *totalrows)));
702+
onerel->rd_nblocks, numrows, *totalrows)));
697703

698704
return numrows;
699705
}

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