@ -52,7 +52,6 @@ typedef struct
* role . In most of these tests the " given role " is the same , namely the
* role . In most of these tests the " given role " is the same , namely the
* active current user . So we can optimize it by keeping a cached list of
* active current user . So we can optimize it by keeping a cached list of
* all the roles the " given role " is a member of , directly or indirectly .
* all the roles the " given role " is a member of , directly or indirectly .
* The cache is flushed whenever we detect a change in pg_auth_members .
*
*
* There are actually two caches , one computed under " has_privs " rules
* There are actually two caches , one computed under " has_privs " rules
* ( do not recurse where rolinherit isn ' t true ) and one computed under
* ( do not recurse where rolinherit isn ' t true ) and one computed under
@ -4675,12 +4674,16 @@ initialize_acl(void)
if ( ! IsBootstrapProcessingMode ( ) )
if ( ! IsBootstrapProcessingMode ( ) )
{
{
/*
/*
* In normal mode , set a callback on any syscache invalidation of
* In normal mode , set a callback on any syscache invalidation of rows
* pg_auth_members rows
* of pg_auth_members ( for each AUTHMEM search in this file ) or
* pg_authid ( for has_rolinherit ( ) )
*/
*/
CacheRegisterSyscacheCallback ( AUTHMEMROLEMEM ,
CacheRegisterSyscacheCallback ( AUTHMEMROLEMEM ,
RoleMembershipCacheCallback ,
RoleMembershipCacheCallback ,
( Datum ) 0 ) ;
( Datum ) 0 ) ;
CacheRegisterSyscacheCallback ( AUTHOID ,
RoleMembershipCacheCallback ,
( Datum ) 0 ) ;
}
}
}
}