Dropped database still shows in the database list. - Mailing list pgsql-admin

From girish R G peetle
Subject Dropped database still shows in the database list.
Date
Msg-id CAKKd064kmqAkqkqfnc2RGsg52gRsyh2MNvcbMsNT=-o0UyYkxA@mail.gmail.com
Whole thread Raw
Responses Re: Dropped database still shows in the database list.
Re: Dropped database still shows in the database list.
List pgsql-admin
Hi,
Dropped database 'RestoreDB' is still being listed in pg_database. 
Any idea why this behavior is seen ? Also I don't see any open connections to this database. 
pg_stat_activity has no rows for this database.

  • postgres=# create database ResotreDB;

    CREATE DATABASE
 

  •  postgres=# select oid, * from pg_database where datname like 'RestoreDB';
oid   |  datname  | datdba | encoding | datcollate  |  datctype   | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl
--------+-----------+--------+----------+-------------+-------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------
177109 | RestoreDB |     10 |        6 | en_US.UTF-8 | en_US.UTF-8 | f             | t            |           -1 |         12891 |         1800 |          1 |          1663 |
(1 row)
 
 
  • postgres=# drop database RestoreDB;
          DROP DATABASE
 
  • postgres=# select oid, * from pg_database where datname like 'RestoreDB';
oid   |  datname  | datdba | encoding | datcollate  |  datctype   | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl
--------+-----------+--------+----------+-------------+-------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------
177109 | RestoreDB |     10 |        6 | en_US.UTF-8 | en_US.UTF-8 | f             | t            |           -1 |         12891 |         1800 |          1 |          1663 |
 
 
  • postgres=# create database RestoreDB;
          CREATE DATABASE
 
  • postgres=# select oid, * from pg_database where datname like 'RestoreDB';
oid   |  datname  | datdba | encoding | datcollate  |  datctype   | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl
--------+-----------+--------+----------+-------------+-------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------
177109 | RestoreDB |     10 |        6 | en_US.UTF-8 | en_US.UTF-8 | f             | t            |           -1 |         12891 |         1800 |          1 |          1663 |
(1 row)
 
 
  • postgres=# select * from version();
version
---------------------------------------------------------------------------------------------------------------
PostgreSQL 9.3.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 64-bit
(1 row)
 
  • postgres=# select * from pg_stat_activity where datname like 'RestoreDB';
datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | state_change | waiting | state | query
-------+---------+-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+------------+-------------+--------------+---------+-------+-------
(0 rows)

Thanks
Girish

pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Postgres Synchronous replication
Next
From: Albe Laurenz
Date:
Subject: Re: Dropped database still shows in the database list.