Re: Parallel CREATE INDEX for BRIN indexes

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tomas Vondra <tomas@vondra.me>
Cc: Andres Freund <andres@anarazel.de>, Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-08-16T15:32:17Z
Lists: pgsql-hackers
On 16.08.24 11:22, Tomas Vondra wrote:
>> These pageinspect tests added a new use of the md5() function.  We got
>> rid of those in the tests for PG17.  You could write the test case with
>> something like
>>
>>   SELECT (CASE WHEN (mod(i,231) = 0) OR (i BETWEEN 3500 AND 4000) THEN
>> NULL ELSE i END),
>> -       (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3750 AND 4250) THEN
>> NULL ELSE md5(i::text) END),
>> +       (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3750 AND 4250) THEN
>> NULL ELSE encode(sha256(i::text::bytea), 'hex') END),
>>          (CASE WHEN (mod(i,233) = 0) OR (i BETWEEN 3850 AND 4500) THEN
>> NULL ELSE (i/100) + mod(i,8) END)
>>
>> But this changes the test output slightly and I'm not sure if this gives
>> you the data distribution that you need for you test.  Could your check
>> this please?
>>
> 
> I think this is fine. The output only changes because sha256 produces
> longer values than md5, so that the summaries are longer the index gets
> a page longer. AFAIK that has no impact on the test.

Ok, I have committed that.  Thanks for checking.




Commits

  1. Remove incidental md5() function use from test

  2. Cleanup parallel BRIN index build code

  3. Stabilize test of BRIN parallel create

  4. Revert "Stabilize test of BRIN parallel create"

  5. Add regression test for BRIN parallel builds

  6. Use the correct PG_DETOAST_DATUM macro in BRIN

  7. Update nbits_set in brin_bloom_union

  8. Fix parallel BRIN builds with synchronized scans

  9. Allow parallel CREATE INDEX for BRIN indexes

  10. Add empty BRIN ranges during CREATE INDEX