I've pushed this, including backpatching the two fixes. I've reduced the amount of data needed by the test, and made sure it works on 32-bits too (I was a bit worried it might be sensitive to that, but that seems not to be the case).
There's still the question of maybe removing the differences between the BTREE and BRIN code for parallel builds, I mentioned in [1]. That's more of a cosmetic issue, but I'll add it as an open item for myself. regards [1] https://www.postgresql.org/message-id/3733d042-71e1-6ae6-5fac-00c12db62db6%40enterprisedb.com -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company