pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Carol Walter <walterc@indiana.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Database in use?
Date: Mon, 02 Mar 2009 15:32:22 -0500
Message-ID: <23817.1236025942@sss.pgh.pa.us> (raw)
In-Reply-To: <EA6C319D-9983-438C-8CB9-5424605A5CE1@indiana.edu>
References: <EA6C319D-9983-438C-8CB9-5424605A5CE1@indiana.edu>

Carol Walter <walterc@indiana.edu> writes:
> Periodically, my databases will give me a message that says that  
> someone is using the database when it appears that no one is.  What  
> causes this?  What can I do about it?

What's the context exactly?

In some cases you can get this type of message because of the fact that
it takes finite time for an existing backend to exit.  For instance in

	psql -c "some command" somedb
	dropdb somedb

there's a nonzero probability that the backend launched for the psql
session will still exist when the dropdb runs.  Recent PG versions have
a hack in DROP DATABASE to wait a little bit to see if conflicting
backends will exit; but maybe you're running a version that hasn't got
that patch, or maybe you're doing something else.

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <23817.1236025942@sss.pgh.pa.us>
Permalink:  ../23817.1236025942@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23817.1236025942@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, walterc@indiana.edu
  Subject: Re: Database in use?
  In-Reply-To: <23817.1236025942@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox