Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-05 Thread Russell Smith
Gregory Stark wrote: It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by other users. I do see Autovacuum touching tables in regression but

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-05 Thread Robert Haas
Maybe put the whole thing into the ERROR message instead of having a separate DETAIL line? ERROR: database %s is being accessed by %d session(s) -or- ERROR: database %s' is being accessed by %d prepared transaction(s) -or- ERROR: database %s' is being accessed by %d session(s) and %d prepared

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-05 Thread Gregory Stark
Russell Smith [EMAIL PROTECTED] writes: Gregory Stark wrote: It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by other users. I do see Autovacuum

[HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Gregory Stark
It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by other users. I do see Autovacuum touching tables in regression but CheckOtherDBBackends() is supposed to

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Alvaro Herrera
Gregory Stark wrote: It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by other users. I do see Autovacuum touching tables in regression but

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Michael Fuhr
On Mon, Aug 04, 2008 at 11:51:35AM +0100, Gregory Stark wrote: It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by other users. Are any prepared

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Gregory Stark
Michael Fuhr [EMAIL PROTECTED] writes: On Mon, Aug 04, 2008 at 11:51:35AM +0100, Gregory Stark wrote: It seems there's something wrong with CheckOtherDBBackends() but I haven't exactly figured out what. There are no other sessions but drop database keeps saying regression is being accessed by

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Gregory Stark
Alvaro Herrera [EMAIL PROTECTED] writes: The buildfarm would be all red if this wasn't something local to your installation, I think. Maybe you should get gdb on the backend and set a breakpoint on errfinish, or maybe step into CheckOtherDBBackends to see why it isn't working. Michael Fuhr

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Alvaro Herrera
Gregory Stark wrote: Alvaro Herrera [EMAIL PROTECTED] writes: The buildfarm would be all red if this wasn't something local to your installation, I think. Maybe you should get gdb on the backend and set a breakpoint on errfinish, or maybe step into CheckOtherDBBackends to see why it

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Andrew Dunstan
Gregory Stark wrote: Alvaro Herrera [EMAIL PROTECTED] writes: The buildfarm would be all red if this wasn't something local to your installation, I think. Maybe you should get gdb on the backend and set a breakpoint on errfinish, or maybe step into CheckOtherDBBackends to see why it

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Gregory Stark wrote: Michael Fuhr solved it so this is academic but, the buildfarm runs make installcheck? I thought it just ran make check It runs both. It also runs contrib installcheck, which will most definitely exercise DROP DATABASE.

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Michael Fuhr [EMAIL PROTECTED] writes: Are any prepared transactions still open? Uh, yes, I did notice that but didn't put two and two together. That does make sense now that you mention it. I've been bit by that too, and so have other people. Maybe

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Heikki Linnakangas
Tom Lane wrote: Gregory Stark [EMAIL PROTECTED] writes: Michael Fuhr [EMAIL PROTECTED] writes: Are any prepared transactions still open? Uh, yes, I did notice that but didn't put two and two together. That does make sense now that you mention it. I've been bit by that too, and so have

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] 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.

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Jens-Wolfhard Schicke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: 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

Re: [HACKERS] DROP DATABASE always seeing database in use

2008-08-04 Thread Tom Lane
Jens-Wolfhard Schicke [EMAIL PROTECTED] writes: Tom Lane wrote: 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