mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Fix code indentation violations in e83d1b0c40
koel has not reported this one yet, I have just bumped on it while looking at a different patch.
This commit is contained in:
@ -390,8 +390,8 @@ SetDatatabaseHasLoginEventTriggers(void)
|
|||||||
* Use shared lock to prevent a conflit with EventTriggerOnLogin() trying
|
* Use shared lock to prevent a conflit with EventTriggerOnLogin() trying
|
||||||
* to reset pg_database.dathasloginevt flag. Note, this lock doesn't
|
* to reset pg_database.dathasloginevt flag. Note, this lock doesn't
|
||||||
* effectively blocks database or other objection. It's just custom lock
|
* effectively blocks database or other objection. It's just custom lock
|
||||||
* tag used to prevent multiple backends changing pg_database.dathasloginevt
|
* tag used to prevent multiple backends changing
|
||||||
* flag.
|
* pg_database.dathasloginevt flag.
|
||||||
*/
|
*/
|
||||||
LockSharedObject(DatabaseRelationId, MyDatabaseId, 0, AccessExclusiveLock);
|
LockSharedObject(DatabaseRelationId, MyDatabaseId, 0, AccessExclusiveLock);
|
||||||
|
|
||||||
@ -917,12 +917,13 @@ EventTriggerOnLogin(void)
|
|||||||
|
|
||||||
PopActiveSnapshot();
|
PopActiveSnapshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There is no active login event trigger, but our pg_database.dathasloginevt was set.
|
* There is no active login event trigger, but our
|
||||||
* Try to unset this flag. We use the lock to prevent concurrent
|
* pg_database.dathasloginevt was set. Try to unset this flag. We use the
|
||||||
* SetDatatabaseHasLoginEventTriggers(), but we don't want to hang the
|
* lock to prevent concurrent SetDatatabaseHasLoginEventTriggers(), but we
|
||||||
* connection waiting on the lock. Thus, we are just trying to acquire
|
* don't want to hang the connection waiting on the lock. Thus, we are
|
||||||
* the lock conditionally.
|
* just trying to acquire the lock conditionally.
|
||||||
*/
|
*/
|
||||||
else if (ConditionalLockSharedObject(DatabaseRelationId, MyDatabaseId,
|
else if (ConditionalLockSharedObject(DatabaseRelationId, MyDatabaseId,
|
||||||
0, AccessExclusiveLock))
|
0, AccessExclusiveLock))
|
||||||
@ -930,8 +931,8 @@ EventTriggerOnLogin(void)
|
|||||||
/*
|
/*
|
||||||
* The lock is held. Now we need to recheck that login event triggers
|
* The lock is held. Now we need to recheck that login event triggers
|
||||||
* list is still empty. Once the list is empty, we know that even if
|
* list is still empty. Once the list is empty, we know that even if
|
||||||
* there is a backend, which concurrently inserts/enables login trigger,
|
* there is a backend, which concurrently inserts/enables login
|
||||||
* it will update pg_database.dathasloginevt *afterwards*.
|
* trigger, it will update pg_database.dathasloginevt *afterwards*.
|
||||||
*/
|
*/
|
||||||
runlist = EventTriggerCommonSetup(NULL,
|
runlist = EventTriggerCommonSetup(NULL,
|
||||||
EVT_Login, "login",
|
EVT_Login, "login",
|
||||||
|
Reference in New Issue
Block a user