*** pg_backup_archiver.c	2009-04-10 00:09:57.000000000 -0400
--- pg_backup_archiver-fix.c	2009-04-10 19:22:07.000000000 -0400
***************
*** 3423,3433 ****
  			if (slots[i].args == NULL)
  				continue;
  			running_te = slots[i].args->te;
  			for (j = 0; j < te->nLockDeps && !conflicts; j++)
  			{
! 				for (k = 0; k < running_te->nLockDeps; k++)
  				{
! 					if (te->lockDeps[j] == running_te->lockDeps[k])
  					{
  						conflicts = true;
  						break;
--- 3423,3450 ----
  			if (slots[i].args == NULL)
  				continue;
  			running_te = slots[i].args->te;
+ 			/* does the candidate item require an exclusive lock that
+ 			 * would block on or conflict with the running item?
+ 			 */
  			for (j = 0; j < te->nLockDeps && !conflicts; j++)
  			{
! 				for (k = 0; k < running_te->nDeps; k++)
  				{
! 					if (te->lockDeps[j] == running_te->dependencies[k])
! 					{
! 						conflicts = true;
! 						break;
! 					}
! 				}
! 			}
! 			/* or does the running item hold an exclusive lock that
! 			 * would block or conflict with the candidate item?
! 			 */
! 			for (j = 0; j < running_te->nLockDeps && !conflicts; j++)
! 			{
! 				for (k = 0; k < te->nDeps; k++)
! 				{
! 					if (running_te->lockDeps[j] == te->dependencies[k])
  					{
  						conflicts = true;
  						break;
