Re: BRIN INDEX value

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: BRIN INDEX value
Date: 2015-09-04 01:20:39
Message-ID: 55E8F1E7.7000900@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/4/2015 8:28 AM, Tatsuo Ishii wrote:
>>
>> Attached hack fixes the symptom but perhaps not the correct fix for this.
>
> Why can't we fix summarize_range() in brin.c:
>
> IndexBuildHeapRangeScan(heapRel, state->bs_irel, indexInfo, false, true,
> heapBlk, state->bs_pagesPerRange,
> brinbuildCallback, (void *) state);
>
> This currently thoughtlessly passes scannumblocks as
> state->bs_pagesPerRange. Shouldn't we change this so that
> (scanStartBlock + scanNumBlocks) does not exceed scan->rs_nblocks?
>

Ah, it did cross my mind to the fix it in brin.c but was not sure. I did
it that way in the attached patch.

Thanks,
Amit

Attachment Content-Type Size
brin-heap-rangescan-fix.patch text/x-diff 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-09-04 01:35:55 Re: Freeze avoidance of very large table.
Previous Message Amit Kapila 2015-09-04 01:15:07 Re: Reduce ProcArrayLock contention