Dropped database still shows in the database list.

From: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Dropped database still shows in the database list.
Date: 2015-05-22 06:50:06
Message-ID: CAKKd064kmqAkqkqfnc2RGsg52gRsyh2MNvcbMsNT=-o0UyYkxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

- p*ostgres=# 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2015-05-22 08:05:41 Re: Dropped database still shows in the database list.
Previous Message Gilberto Castillo 2015-05-21 21:19:04 Re: Postgres Synchronous replication