src/backend/utils/init/miscinit.c
/*
 * Initialize user identity during special backend startup
 */
Initialize user identity during special backend startup
Initialize user identity during special backend startup
void
InitializeSessionUserIdStandalone(void)
{
	AssertState(!IsUnderPostmaster || IsAutoVacuumWorkerProcess() || IsBackgroundWorker
				|| am_startup
				|| (am_ftshandler && am_mirror)
				|| am_global_deadlock_detector);
	AssertState(!OidIsValid(AuthenticatedUserId));
	AuthenticatedUserId = BOOTSTRAP_SUPERUSERID;
	AuthenticatedUserIsSuperuser = true;
	SetSessionUserId(BOOTSTRAP_SUPERUSERID, true);
}
void InitializeSessionUserIdStandalone ( void ) { AssertState ( ! IsUnderPostmaster || IsAutoVacuumWorkerProcess ( ) || IsBackgroundWorker || am_startup || ( am_ftshandler && am_mirror ) || am_global_deadlock_detector ) ; AssertState ( ! OidIsValid ( AuthenticatedUserId ) ) ; AuthenticatedUserId = BOOTSTRAP_SUPERUSERID ; AuthenticatedUserIsSuperuser = true ; SetSessionUserId ( BOOTSTRAP_SUPERUSERID , true ) ; }
Initialize user identity during special backend startup
Initialize user identity during special backend startup
/*
	 * This function should only be called in single-user mode, in autovacuum
	 * workers, and in background workers.
	 */ /* call only once */