On 2019-Jun-07, Robert Haas wrote:
> On Fri, Jun 7, 2019 at 8:43 AM Robert Haas <robertmhaas@gmail.com> wrote:
> > Good catch, and now I notice that the callback is not called
> > estimate_rel_size but relation_estimate_size. Updated patch attached;
> > thanks for the review.
>
> Let's try that one more time, and this time perhaps I'll make it compile.
It looks good to me, passes tests. This version seems to introduce a warning
in my build:
/pgsql/source/master/src/backend/access/table/tableam.c: In function 'table_block_relation_estimate_size':
/pgsql/source/master/src/backend/access/table/tableam.c:633:12: warning: implicit declaration of function 'rint'
[-Wimplicit-function-declaration]
*tuples = rint(density * (double) curpages);
^~~~
/pgsql/source/master/src/backend/access/table/tableam.c:633:12: warning: incompatible implicit declaration of built-in
function'rint'
/pgsql/source/master/src/backend/access/table/tableam.c:633:12: note: include '<math.h>' or provide a declaration of
'rint'
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services