Re: tableam: abstracting relation sizing code - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: tableam: abstracting relation sizing code
Date
Msg-id 20190607160526.GA2813@alvherre.pgsql
Whole thread Raw
In response to Re: tableam: abstracting relation sizing code  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: tableam: abstracting relation sizing code
Next
From: Robert Haas
Date:
Subject: tableam: inconsistent parameter name