Re: Minor verbosity increase for analyze - Mailing list pgsql-patches

From Mark Kirkwood
Subject Re: Minor verbosity increase for analyze
Date
Msg-id 3F5916C7.8040703@paradise.net.nz
Whole thread Raw
In response to Re: Minor verbosity increase for analyze  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: Minor verbosity increase for analyze
List pgsql-patches
Found some bugs with this patch - that makes it about 1 per line
patched... :-(

i)  onerel->rd_nblocks should be elog'ed as an unsigned int.
ii) acquire_sample_rows has 2 return points - I had ignored the case
where the
    onerel has < sample size tuples in it.



--- src/backend/commands/analyze.c.orig    2003-09-06 10:31:02.000000000 +1200
+++ src/backend/commands/analyze.c    2003-09-06 10:35:15.000000000 +1200
@@ -539,6 +539,9 @@
     if (!HeapTupleIsValid(tuple))
     {
         *totalrows = (double) numrows;
+        elog(elevel, "  pages = %u rows = %.0f [smaller than sample size]",
+            onerel->rd_nblocks, *totalrows); /* display pages and rows */
+
         return numrows;
     }

@@ -690,7 +693,7 @@
     /*
      * Emit some interesting relation info
      */
-    elog(elevel, "  pages = %d rows/page = %d rows = %.0f",
+    elog(elevel, "  pages = %u rows/page = %d rows = %.0f",
         onerel->rd_nblocks, (int)tuplesperpage, *totalrows);

     return numrows;

pgsql-patches by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: IPV4 addresses on IPV6 machines in pg_hba.conf
Next
From: Tom Lane
Date:
Subject: Re: IPV4 addresses on IPV6 machines in pg_hba.conf