How does PG know when a database is being accessed

From: "Nick Fankhauser - Doxpop" <nickf(at)doxpop(dot)com>
To: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
Subject: How does PG know when a database is being accessed
Date: 2003-04-08 13:56:48
Message-ID: NEBBLAAHGLEEPCGOBHDGMEAGHCAA.nickf@doxpop.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi-

This is a problem I've observed on version 7.2.1.

I've been doing some setup work that involves dropping & recreating
databases a couple of times and I've noticed that once in a while, I'll get
the "database is being accessed by other users" message, even after
restarting the postmaster. This of course prevents me from dropping the DB.

I'd expect to get this if I've killed a client connection and the postmaster
hasn't had time to notice that the connection is defunct, but I was
surprised that restarting the postmaster didn't clear out the connections.

A couple of hours later, I can drop the database with no problem, and I
haven't done anything in the meantime, so I presume that a cleanup process
has run & tidied things up.

How are connections tracked & why does a record of a defunct client process
seem to persist through a restart?

Thanks
-Nick

---------------------------------------------------------------------
Nick Fankhauser

nickf(at)doxpop(dot)com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/

Browse pgsql-admin by date

  From Date Subject
Next Message Arthur 2003-04-08 14:00:28 Help with setting Posgresql on Linux to work with ASP on win2k
Previous Message Bob Wheldon 2003-04-08 13:47:02 User Group meeting in Bavaria or Austria in April?