pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOpen connections details
3+ messages / 3 participants
[nested] [flat]
* Open connections details
@ 2005-11-08 11:35 Andrew Watters <andrew@gocontent.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Watters @ 2005-11-08 11:35 UTC (permalink / raw)
To: pgsql-admin
Hi
I am trying to find details about open connections. I can see that there
are open connections through Tools | Server Status in pgAdmin III. How
can I find what the current and/or last SQL statement was that was run
in those open connections please?
Thanks for your help
Andrew
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Open connections details
@ 2005-11-09 06:24 hubert depesz lubaczewski <depesz@gmail.com>
parent: Andrew Watters <andrew@gocontent.com>
0 siblings, 1 reply; 3+ messages in thread
From: hubert depesz lubaczewski @ 2005-11-09 06:24 UTC (permalink / raw)
To: Andrew Watters <andrew@gocontent.com>; +Cc: pgsql-admin
On 11/8/05, Andrew Watters <andrew@gocontent.com> wrote:
>
> I am trying to find details about open connections. I can see that there
> are open connections through Tools | Server Status in pgAdmin III. How
> can I find what the current and/or last SQL statement was that was run
> in those open connections please?
>
select * from pg_stat_activity;
you might have to turn on stats_command_string in postgresql.conf.
depesz
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Open connections details
@ 2005-11-14 03:05 Thomas F. O'Connell <tfo@sitening.com>
parent: hubert depesz lubaczewski <depesz@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Thomas F. O'Connell @ 2005-11-14 03:05 UTC (permalink / raw)
To: pgsql-admin; +Cc: Andrew Watters <andrew@gocontent.com>
On Nov 9, 2005, at 12:24 AM, hubert depesz lubaczewski wrote:
> On 11/8/05, Andrew Watters <andrew@gocontent.com> wrote:
> I am trying to find details about open connections. I can see that
> there
> are open connections through Tools | Server Status in pgAdmin III. How
> can I find what the current and/or last SQL statement was that was run
> in those open connections please?
>
> select * from pg_stat_activity;
> you might have to turn on stats_command_string in postgresql.conf.
Depending on how you need to access the information, you should also
check out the logging options available to you:
http://www.postgresql.org/docs/8.1/static/runtime-config-
logging.html#RUNTIME-CONFIG-LOGGING-WHAT
log_line_prefix has a variety of potentially relevant options that
can be used in combination with log_statement.
--
Thomas F. O'Connell
Database Architecture and Programming
Co-Founder
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-11-14 03:05 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-08 11:35 Open connections details Andrew Watters <andrew@gocontent.com>
2005-11-09 06:24 ` hubert depesz lubaczewski <depesz@gmail.com>
2005-11-14 03:05 ` Thomas F. O'Connell <tfo@sitening.com>
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