Re: pgsql: Buffering GiST index build algorithm.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Buffering GiST index build algorithm.
Date: 2011-09-08 20:34:38
Message-ID: 4E6926DE.30201@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 09/08/2011 04:13 PM, Andrew Dunstan wrote:
>
>
> On 09/08/2011 10:56 AM, Heikki Linnakangas wrote:
>> Buffering GiST index build algorithm.
>>
>> When building a GiST index that doesn't fit in cache, buffers are
>> attached
>> to some internal nodes in the index. This speeds up the build by
>> avoiding
>> random I/O that would otherwise be needed to traverse all the way
>> down the
>> tree to the find right leaf page for tuple.
>
>
> This seems to have broken MSVC builds:
>
> "C:\prog\bf\root\HEAD\pgsql.5584\pgsql.sln" (default target) (1) ->
> (postgres target) ->
> .\src\backend\access\gist\gistbuild.c(423): warning C4013:
> 'round' undefined; assuming extern returning int
>
>
> "C:\prog\bf\root\HEAD\pgsql.5584\pgsql.sln" (default target) (1) ->
> (postgres target) ->
> gistbuild.obj : error LNK2019: unresolved external symbol round
> referenced in function calculatePagesPerBuffer
> .\Debug\postgres\postgres.exe : fatal error LNK1120: 1
> unresolved externals
>
>
> Maybe we need to include math.h. And while we're about it, should the
> result of round() be cast to an int, since that's what the function
> returns?
>
>

Or use rint(), which we certainly have.

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-09-08 20:38:53 pgsql: round() is not portable. Use rint().
Previous Message Peter Eisentraut 2011-09-08 20:14:09 pgsql: Translation updates for 9.1.0