f Postgres template0 db can't be vacuumed ~ 迪貝之家

Pages

Postgres template0 db can't be vacuumed

Nagios 發出這個alert
edb=# \c template0
FATAL: database "template0" is not currently accepting connections
Previous connection kept
edb=# update pg_database set datallowconn='t' where datname='template0';
UPDATE 1
edb=# \c template0
psql (9.5.19, server 9.0.4.14)
You are now connected to database "template0" as user "enterprisedb".
template0=# vacuum;
VACUUM
template0=# \c edb
psql (9.5.19, server 9.0.4.14)
You are now connected to database "edb" as user "enterprisedb".
edb=# update pg_database set datallowconn='f' where datname='template0';
UPDATE 1
edb=# \c template0
FATAL: database "template0" is not currently accepting connections
Previous connection kept