>  기사  >  데이터 베이스  >  Howvacuumtemplate0

Howvacuumtemplate0

WBOY
WBOY원래의
2016-06-07 16:10:201312검색

[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으로 문의하세요.