Remove unnecessary UPDATE commands to assign explicit ACLs to functions
and PL languages during initdb. The default permissions for these objects are the same as what we were assigning anyway, so there is no need to expend space in the catalogs on them. The space cost is particularly significant in pg_proc's indexes, which are bloated by about a factor of 2 by the full-table update, and can never really recover the space. initdb not forced, since the change has no actual impact on behavior.
This commit is contained in:
parent
c580d94541
commit
dffab0c88d
@ -39,7 +39,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
* Portions taken from FreeBSD.
|
* Portions taken from FreeBSD.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.80 2005/04/12 14:19:43 petere Exp $
|
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.81 2005/04/12 19:29:24 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1672,7 +1672,10 @@ setup_conversion(void)
|
|||||||
/*
|
/*
|
||||||
* Set up privileges
|
* Set up privileges
|
||||||
*
|
*
|
||||||
* We set most system catalogs and built-in functions as world-accessible.
|
* We mark most system catalogs as world-readable. We don't currently have
|
||||||
|
* to touch functions, languages, or databases, because their default
|
||||||
|
* permissions are OK.
|
||||||
|
*
|
||||||
* Some objects may require different permissions by default, so we
|
* Some objects may require different permissions by default, so we
|
||||||
* make sure we don't overwrite privilege sets that have already been
|
* make sure we don't overwrite privilege sets that have already been
|
||||||
* set (NOT NULL).
|
* set (NOT NULL).
|
||||||
@ -1687,12 +1690,6 @@ setup_privileges(void)
|
|||||||
"UPDATE pg_class "
|
"UPDATE pg_class "
|
||||||
" SET relacl = '{\"=r/\\\\\"$POSTGRES_SUPERUSERNAME\\\\\"\"}' "
|
" SET relacl = '{\"=r/\\\\\"$POSTGRES_SUPERUSERNAME\\\\\"\"}' "
|
||||||
" WHERE relkind IN ('r', 'v', 'S') AND relacl IS NULL;\n",
|
" WHERE relkind IN ('r', 'v', 'S') AND relacl IS NULL;\n",
|
||||||
"UPDATE pg_proc "
|
|
||||||
" SET proacl = '{\"=X/\\\\\"$POSTGRES_SUPERUSERNAME\\\\\"\"}' "
|
|
||||||
" WHERE proacl IS NULL;\n",
|
|
||||||
"UPDATE pg_language "
|
|
||||||
" SET lanacl = '{\"=U/\\\\\"$POSTGRES_SUPERUSERNAME\\\\\"\"}' "
|
|
||||||
" WHERE lanpltrusted;\n",
|
|
||||||
"GRANT USAGE ON SCHEMA pg_catalog TO PUBLIC;\n",
|
"GRANT USAGE ON SCHEMA pg_catalog TO PUBLIC;\n",
|
||||||
"GRANT CREATE, USAGE ON SCHEMA public TO PUBLIC;\n",
|
"GRANT CREATE, USAGE ON SCHEMA public TO PUBLIC;\n",
|
||||||
NULL
|
NULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user