Re: Microoptimization of Bitmapset usage in postgres_fdw

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2018-06-14T20:14:54Z
Lists: pgsql-hackers
Thanks for the updated patch set.

On 6/14/18, 2:34 PM, "Daniel Gustafsson" <daniel@yesql.se> wrote:
>> 2) BuildRelationExtStatistics() in extended_stats.c.
>> 
>> 	/* check allowed number of dimensions */
>> 	Assert(bms_num_members(stat->columns) >= 2 &&
>> 		   bms_num_members(stat->columns) <= STATS_MAX_DIMENSIONS);
>
> Since this usage is in an assertion I don’t see the value in changing it as the
> current programming is more optimized for readability.

Agreed.  I hesitated to even point this one out.

I'll go ahead and mark this as Ready for Committer.

Nathan

Commits

  1. Use optimized bitmap set function for membership test in postgres_fdw