Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Fri, 26 May 2006 22:15:17 +0200
  • Message-id: <87ejygo84q(dot)fsf(at)gate450(dot)dyndns(dot)org>

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;
  	}



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group