Re: GIN stuck in loop during PITR - Mailing list pgsql-hackers

From Andreas Seltenreich
Subject Re: GIN stuck in loop during PITR
Date
Msg-id 87ejygo84q.fsf@gate450.dyndns.org
Whole thread Raw
In response to Re: GIN stuck in loop during PITR  (Andreas Seltenreich <andreas+pg@gate450.dyndns.org>)
List pgsql-hackers
Andreas Seltenreich schrob:

> Teodor Sigaev schrob:
>
>> Thanks a lot, applied. Can you describe test suite? It may be useful
>> for test more...
>
> Here's a shell script that triggers the bug when I revert the patch.

Just tried the script on HEAD, and it was triggering an assertion. I
guess it is because we are still returning InvalidOffsetNumber in the
trivial case (looks like a typo to me). I've attached a patch.

regards,
andreas

Index: ginbtree.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/access/gin/ginbtree.c,v
retrieving revision 1.2
diff -c -r1.2 ginbtree.c
*** ginbtree.c    26 May 2006 08:01:17 -0000    1.2
--- ginbtree.c    26 May 2006 20:09:45 -0000
***************
*** 189,195 ****     Assert( !GinPageIsLeaf(page) );      /* check trivial case */
!     if ( (root->off != btree->findChildPtr(btree, page, stack->blkno, InvalidOffsetNumber)) != InvalidBuffer ) {
  stack->parent = root;         return;     }
 
--- 189,195 ----     Assert( !GinPageIsLeaf(page) );      /* check trivial case */
!     if ( (root->off = btree->findChildPtr(btree, page, stack->blkno, InvalidOffsetNumber)) != InvalidOffsetNumber ) {
       stack->parent = root;         return;     }
 


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: XLogArchivingActive
Next
From: Simon Riggs
Date:
Subject: Re: Compression and on-disk sorting