Re: Parallel CREATE INDEX for BRIN indexes

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Parallel CREATE INDEX for BRIN indexes
Date: 2024-08-16 15:32:17
Message-ID: 46d8ba1e-d9e1-4ae1-ba53-2bc67a4ae3cd@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-08-16 15:34:34 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Previous Message Robert Haas 2024-08-16 15:29:17 Re: Make query cancellation keys longer