Howvacuumtemplate0

原创
2016-06-07 16:10:20 951浏览

[pg@h1 ~]$ vacuumdb --freeze template0vacuumdb: could not connect to database template0: FATAL: database template0 is not currently accepting connections[pg@h1 ~]$ psql template0psql: FATAL: database template0 is not currently accepting co


[pg@h1 ~]$ vacuumdb --freeze template0
vacuumdb: could not connect to database template0: FATAL:  database "template0" is not currently accepting connections
[pg@h1 ~]$ psql template0
psql: FATAL:  database "template0" is not currently accepting connections
[pg@h1 ~]$ PGOPTIONS='-c gp_session_role=utility' psql template1
psql (8.2.15)
Type "help" for help.
 
template1=# set allow_system_table_mods='DML';
SET
template1=# update pg_database set datallowconn='t' where datname='template0';
UPDATE 1
template1=# \c template0
You are now connected to database "template0" as user "pg".
template0=# vacuum freeze ;
VACUUM
template0=# \q
[pg@h1 ~]$ PGOPTIONS='-c gp_session_role=utility' psql template1
psql (8.2.15)
Type "help" for help.
 
template1=# set allow_system_table_mods='DML';
SET
template1=# update pg_database set datallowconn='f' where datname='template0';
UPDATE 1



-EOF-
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。