Index: src/backend/commands/indexcmds.c
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/commands/indexcmds.c,v
retrieving revision 1.162
diff -c -p -r1.162 indexcmds.c
*** src/backend/commands/indexcmds.c	25 Aug 2007 19:08:19 -0000	1.162
--- src/backend/commands/indexcmds.c	25 Aug 2007 22:11:18 -0000
*************** ReindexDatabase(const char *databaseName
*** 1292,1297 ****
--- 1292,1301 ----
  		if (classtuple->relkind != RELKIND_RELATION)
  			continue;
  
+ 		/* Skip temp tables of other backends; we can't reindex them at all */
+ 		if (isOtherTempNamespace(classtuple->relnamespace))
+ 			continue;
+ 
  		/* Check user/system classification, and optionally skip */
  		if (IsSystemClass(classtuple))
  		{
