Index: src/backend/utils/init/postinit.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/utils/init/postinit.c,v
retrieving revision 1.117
diff -c -r1.117 postinit.c
*** src/backend/utils/init/postinit.c	3 Oct 2002 19:19:09 -0000	1.117
--- src/backend/utils/init/postinit.c	20 Nov 2002 18:26:55 -0000
***************
*** 399,413 ****
  		CommitTransactionCommand(true);
  
  	/*
! 	 * Check a normal user hasn't connected to a superuser reserved slot.
! 	 * Do this here since we need the user information and that only
! 	 * happens after we've started bringing the shared memory online. So
! 	 * we wait until we've registered exit handlers and potentially shut
! 	 * an open transaction down for an as safety conscious rejection as
! 	 * possible.
  	 */
! 	if (CountEmptyBackendSlots() < ReservedBackends && !superuser())
! 		elog(ERROR, "Non-superuser connection limit exceeded");
  }
  
  /*
--- 399,418 ----
  		CommitTransactionCommand(true);
  
  	/*
! 	 * Check a normal user hasn't connected to a superuser reserved
! 	 * slot.  Do this here since we need the user information and that
! 	 * only happens after we've started bringing the shared memory
! 	 * online. So we wait until we've registered exit handlers and
! 	 * potentially shut an open transaction down for an as safety
! 	 * conscious rejection as possible. We don't bother checking the
! 	 * limit (which means acquiring an LWLock) unless some slots have
! 	 * been reserved and the current user is not the superuser.
  	 */
! 	if (ReservedBackends && !superuser())
! 	{
! 		if (CountEmptyBackendSlots() < ReservedBackends)
! 			elog(ERROR, "Non-superuser connection limit exceeded");
! 	}
  }
  
  /*
