From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Gaetano Mendola <mendola(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Suspicious check (src/backend/access/gin/gindatapage.c) |
Date: | 2014-09-12 00:48:53 |
Message-ID: | CAB7nPqRbLahnsPE7fXwaR14Rqa0H87WAJPH70cGWRwg5msLiTg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 12, 2014 at 7:35 AM, Gaetano Mendola <mendola(at)gmail(dot)com> wrote:
> At line 650 I can read:
>
> if ((leaf->lsize - segsize) - (leaf->lsize - segsize) < BLCKSZ / 4)
> break;
>
> I believe one of the two should be leaf->rsize
Yes this condition is broken. Shouldn't it be that instead when
appending items at the end of a page?
if ((leaf->lsize - segsize) - (leaf->rsize + segsize) < BLCKSZ / 4)
This has been introduced by 36a35c5 and should be backpatched to 9.4.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20140912_gin_compress_cond.patch | text/x-diff | 562 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2014-09-12 01:01:29 | Re: jsonb format is pessimal for toast compression |
Previous Message | Kouhei Kaigai | 2014-09-12 00:40:01 | Re: [v9.5] Custom Plan API |