I'm trying to unsuccessfully to drop a database using the latest
CVS code for 8.0.0, getting the following error:
ERROR: cannot drop the currently open database
So I must have a connection open, right? So I look for
connections with the command I use on 7.3.4 but see nothing:
SELECT pg_stat_get_backend_pid(S.backendid) AS pid,
db.datname AS database, dbu.usename AS user,
pg_stat_get_backend_activity(S.backendid) AS query
FROM pg_user dbu,
(SELECT pg_stat_get_backend_idset() AS backendid) AS S,
pg_database db
WHERE db.oid = pg_stat_get_backend_dbid(S.backendid)
AND dbu.usesysid = pg_stat_get_backend_userid(S.backendid);
pid | database | user | query
-----+----------+------+---------
(0 rows)
So I look at the process table listing:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
db2dba 1039 0.0 0.2 114604 3388 pts/3 S 13:49 0:00 postmaster -D
/users/db2dba/dbclusters/db2/postgresql-8.0.0beta2/data-i -p 9802
db2dba 1042 0.0 0.1 6720 1544 pts/3 S 13:49 0:00 postgres: logger process
db2dba 1044 0.0 0.5 114740 6836 pts/3 S 13:49 0:00 postgres: writer process
db2dba 1045 0.0 0.2 7736 2592 pts/3 S 13:49 0:00 postgres: stats buffer process
db2dba 1046 0.0 0.1 7044 1856 pts/3 S 13:49 0:00 postgres: stats collector process
Sure don't see anything open. I can stop/restart to get around it,
but wondering what is going on?
Ed