Re: unexpected connection in query window

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: unexpected connection in query window
Date: 2010-03-15 20:37:25
Message-ID: 4B9E9A85.3060506@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Le 15/03/2010 15:17, Little, Douglas a écrit :
> Hi,
> I'm seeing behavior that is unexpected. Hopeing to get a better understanding of how PGadmin manages connections
>
> I have a query window with 20+sql statements, connected to my fqa database. I'm running sql individually and seeing that sometimes they are directed to my prod database, instead of the fqa database that is the displayed connection for the window.
>
> I have several query windows open, but only submitting queries from the active window at this time.
> I have 2 server status windows open for my fqa and prod database
> I am switching between the running query, and the system status's to monitor execution.
>
> What should I expect pgadmin to do with the multiple connections?
>

Not sure I completely understand your question, but here is an quick
explanation of pgAdmin's use of connections.

Behavior depends on the window.

The main window (aka the browser window) will have as many connections
as necessary. You double-click to connect to a server : you'll have a
connection to the maintenance database of this server and a connection
to the last database you were connected to (if you choose this option in
the Options window and if you were connected to another database than
the maintenance one). Then, you have a connection to every database you
see without a red cross. You can close a connection with the contextual
menu of a database. If you don't, all connection will be closed when you
quit the app.

The query tool opens a connection to the database you were connected to
when you clicked on the query tool button (or chose the query tool item
in the menu). If you choose another connection in the combobox of the
toolbar, it will open a new connection without closing the first ones.
They will all be closed when you will quit the query tool.

The status window opens a connection to the maintenance database
(usually postgres) of the server you were connected to when you chose
the Status window item in the menu. In 1.10, you can select another
database for the lock report so that we can show the locked relations'
names (which obviously opens another connection to this database). If
you change this connection, it closes the other one but keeps the
connection to the maintenance database (as it is needed for the other
report).

When you dump or restore a database, it will launch pg_dump or
pg_restore. They will open their own connection to the appropriate database.

There are other tools I probably forgot (the configuration ones for
example), but they are less important.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Josh Berkus 2010-03-15 22:16:37 Bug: recent files reset
Previous Message Little, Douglas 2010-03-15 14:17:46 unexpected connection in query window