mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Remove flatfiles.c, which is now obsolete.
Recent commits have removed the various uses it was supporting. It was a performance bottleneck, according to bug report #4919 by Lauris Ulmanis; seems it slowed down user creation after a billion users.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.187 2009/06/11 14:48:56 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.188 2009/09/01 02:54:51 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -26,7 +26,6 @@
|
||||
#include "storage/lmgr.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/flatfiles.h"
|
||||
#include "utils/fmgroids.h"
|
||||
#include "utils/guc.h"
|
||||
#include "utils/lsyscache.h"
|
||||
@ -385,15 +384,9 @@ CreateRole(CreateRoleStmt *stmt)
|
||||
GetUserId(), false);
|
||||
|
||||
/*
|
||||
* Close pg_authid, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authid, but keep lock till commit.
|
||||
*/
|
||||
heap_close(pg_authid_rel, NoLock);
|
||||
|
||||
/*
|
||||
* Set flag to update flat auth file at commit.
|
||||
*/
|
||||
auth_file_update_needed();
|
||||
}
|
||||
|
||||
|
||||
@ -710,15 +703,9 @@ AlterRole(AlterRoleStmt *stmt)
|
||||
false);
|
||||
|
||||
/*
|
||||
* Close pg_authid, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authid, but keep lock till commit.
|
||||
*/
|
||||
heap_close(pg_authid_rel, NoLock);
|
||||
|
||||
/*
|
||||
* Set flag to update flat auth file at commit.
|
||||
*/
|
||||
auth_file_update_needed();
|
||||
}
|
||||
|
||||
|
||||
@ -808,7 +795,6 @@ AlterRoleSet(AlterRoleSetStmt *stmt)
|
||||
CatalogUpdateIndexes(rel, newtuple);
|
||||
|
||||
ReleaseSysCache(oldtuple);
|
||||
/* needn't keep lock since we won't be updating the flat file */
|
||||
heap_close(rel, RowExclusiveLock);
|
||||
}
|
||||
|
||||
@ -970,16 +956,10 @@ DropRole(DropRoleStmt *stmt)
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we can clean up; but keep locks until commit (to avoid possible
|
||||
* deadlock failure while updating flat file)
|
||||
* Now we can clean up; but keep locks until commit.
|
||||
*/
|
||||
heap_close(pg_auth_members_rel, NoLock);
|
||||
heap_close(pg_authid_rel, NoLock);
|
||||
|
||||
/*
|
||||
* Set flag to update flat auth file at commit.
|
||||
*/
|
||||
auth_file_update_needed();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1092,15 +1072,9 @@ RenameRole(const char *oldname, const char *newname)
|
||||
ReleaseSysCache(oldtuple);
|
||||
|
||||
/*
|
||||
* Close pg_authid, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authid, but keep lock till commit.
|
||||
*/
|
||||
heap_close(rel, NoLock);
|
||||
|
||||
/*
|
||||
* Set flag to update flat auth file at commit.
|
||||
*/
|
||||
auth_file_update_needed();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1157,15 +1131,9 @@ GrantRole(GrantRoleStmt *stmt)
|
||||
}
|
||||
|
||||
/*
|
||||
* Close pg_authid, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authid, but keep lock till commit.
|
||||
*/
|
||||
heap_close(pg_authid_rel, NoLock);
|
||||
|
||||
/*
|
||||
* Set flag to update flat auth file at commit.
|
||||
*/
|
||||
auth_file_update_needed();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1385,8 +1353,7 @@ AddRoleMems(const char *rolename, Oid roleid,
|
||||
}
|
||||
|
||||
/*
|
||||
* Close pg_authmem, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authmem, but keep lock till commit.
|
||||
*/
|
||||
heap_close(pg_authmem_rel, NoLock);
|
||||
}
|
||||
@ -1498,8 +1465,7 @@ DelRoleMems(const char *rolename, Oid roleid,
|
||||
}
|
||||
|
||||
/*
|
||||
* Close pg_authmem, but keep lock till commit (this is important to
|
||||
* prevent any risk of deadlock failure while updating flat file)
|
||||
* Close pg_authmem, but keep lock till commit.
|
||||
*/
|
||||
heap_close(pg_authmem_rel, NoLock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user