Re: [HACKERS] Suspicious check (src/backend/access/gin/gindatapage.c)

2014-09-15 Thread Michael Paquier
On Fri, Sep 12, 2014 at 5:42 PM, Heikki Linnakangas wrote: > On 09/12/2014 11:38 AM, Heikki Linnakangas wrote: >> >> Now that the logic is fixed, I hope we >> won't get complaints that the indexes are bigger, if you fill a table by >> appending to the end. I wonder if we should aim at an even more

Re: [HACKERS] Suspicious check (src/backend/access/gin/gindatapage.c)

2014-09-12 Thread Heikki Linnakangas
On 09/12/2014 11:38 AM, Heikki Linnakangas wrote: Now that the logic is fixed, I hope we won't get complaints that the indexes are bigger, if you fill a table by appending to the end. I wonder if we should aim at an even more uneven split; the default fillfactor for B-trees is 90%, for example. I

Re: [HACKERS] Suspicious check (src/backend/access/gin/gindatapage.c)

2014-09-12 Thread Heikki Linnakangas
On 09/12/2014 03:48 AM, Michael Paquier wrote: On Fri, Sep 12, 2014 at 7:35 AM, Gaetano Mendola 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. S

Re: [HACKERS] Suspicious check (src/backend/access/gin/gindatapage.c)

2014-09-11 Thread Michael Paquier
On Fri, Sep 12, 2014 at 7:35 AM, Gaetano Mendola 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

[HACKERS] Suspicious check (src/backend/access/gin/gindatapage.c)

2014-09-11 Thread Gaetano Mendola
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 -- cpp-today.blogspot.com