From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
Cc: | "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Michael Fuhr" <mike(at)fuhr(dot)org>, "Postgres" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: DROP DATABASE always seeing database in use |
Date: | 2008-08-04 16:09:51 |
Message-ID: | 5684.1217866191@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> I've been bit by that too, and so have other people. Maybe it'd be
>> worth the trouble to improve the message so that it explicitly tells you
>> when there are prepared transactions blocking the DROP.
> Yes, that should be easy enough.
I looked at this quickly and decided that we can do it with some small
changes to CheckOtherDBBackends(). I propose counting the number of
conflicting PGPROCs and adding a DETAIL line to the existing error
message:
ERROR: database "%s" is being accessed by other users
DETAIL: There are %d session(s) and %d prepared transaction(s) using the database.
I'm aware that this phrasing might not translate very nicely ... anyone
have a suggestion for better wording?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David Blewett | 2008-08-04 17:08:40 | PL/PythonU |
Previous Message | Heikki Linnakangas | 2008-08-04 15:55:29 | Re: DROP DATABASE always seeing database in use |