Re: pgsql: Rename files and headers related to index AM

2019-12-28 Thread Andres Freund
Hi, On 2019-12-27 08:20:17 +0900, Michael Paquier wrote: > On Thu, Dec 26, 2019 at 10:26:51AM -0800, Peter Geoghegan wrote: > > On Thu, Dec 26, 2019 at 10:15 AM Andres Freund wrote: > >> Yea, this seems like a much bigger move than warranted. Especially > >> without a backward compat header put i

Re: pgsql: Rename files and headers related to index AM

2019-12-28 Thread Tom Lane
Andres Freund writes: > On 2019-12-27 08:20:17 +0900, Michael Paquier wrote: >> Hm, I am not sure that it is actually that much used, such stuff is >> very specialized. > That's true for some of this, but e.g. genam.h is pretty widely > included. I mean, you had to adapt like 100+ files and while

pgsql: Micro-optimize AllocSetFreeIndex() by reference to pg_bitutils c

2019-12-28 Thread Tom Lane
Micro-optimize AllocSetFreeIndex() by reference to pg_bitutils code. Use __builtin_clz() where available. Where it isn't, we can still win a little by using the pg_leftmost_one_pos[] lookup table instead of having a private table. Also drop the initial right shift by ALLOC_MINBITS in favor of su