Re: GIN stuck in loop during PITR

From: Andreas Seltenreich <andreas+pg(at)gate450(dot)dyndns(dot)org>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GIN stuck in loop during PITR
Date: 2006-05-26 20:15:17
Message-ID: 87ejygo84q.fsf@gate450.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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;
}

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-05-26 20:21:44 Re: Compression and on-disk sorting
Previous Message Jim C. Nasby 2006-05-26 20:11:11 Re: XLogArchivingActive