Re: zope, postgresql and idle connections

From: "Lee Harr" <missive(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: zope, postgresql and idle connections
Date: 2004-06-05 02:10:45
Message-ID: BAY2-F136hXCRQcqmSv000015d8@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>database "xyz" is being accessed by other users
>
>is my problem.
>
>i use postgesql 7.3.2 and zope 2.6.1 (python 2.1.3).
>i want to create and drop databases. creating is no problem and my
>script works fine. but dropping is the problem - postgres don't wanna
>drop the db (bin/dropdb).

I have one system that is pretty much just like that. For me, this
error is always because of an open connection from Zope to the
database.

>is there any suggestions from you? or does anybody know how to close a
>connection with zope (just "close connection" in the control panel
>didn't help).

The connections to the (postgresql) database are not controlled in the
"Control Panel" -- that only deals with the Zope database (ZODB) itself.

The connections to postgres may be sprinkled throughout your folders.
They are the "Database Connection" objects. In my case, I am using the
psycopg db connector so they are "Z Psycopg Database Connection"
objects.

I can go to the "Root Folder" click on the "Find" tab, select
"Z Psycopg Database Connector" in the "Find objects of type:" selection
box and find all of the connectors that exist.

When I wanted to drop/ re-create databases in a script, what I did was
use pexpect (a python expect-like module) and w3m (a text based web
browser) to access the URLs which will close the database connections.

Every time I had any trouble, there was a Database Connector that was
created for some kind of testing and was left open accidentally.

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2004-06-05 04:21:14 Re: PostgreSQL certifications?
Previous Message Stephan Szabo 2004-06-05 01:47:14 Re: Timestamp precision and rounding