query execution

Started by Matthew Peterover 20 years ago3 messagesgeneral
Jump to latest
#1Matthew Peter
survivedsushi@yahoo.com

There a way to watch queries execute on the pgsql
server as queries come in from the network and are
processed?

Thanks
MP

__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

#2Richard Huxton
dev@archonet.com
In reply to: Matthew Peter (#1)
Re: query execution

Matthew Peter wrote:

There a way to watch queries execute on the pgsql
server as queries come in from the network and are
processed?

You could try "SELECT * FROM pg_stat_activity", though it's not
guaranteed to be complete. Look in the manuals for the chapter
"Monitoring Database Activity".

--
Richard Huxton
Archonet Ltd

#3codeWarrior
gpatnude@hotmail.com
In reply to: Matthew Peter (#1)
Re: query execution

in your postgresql.conf file near the bottom you need to enable statement
logging -- set log_statement = 'all'
and then you can

tail -f /var/logs/postgresql/postgresql.log

or tail -f wherever your postgres log is...

from the 'Nix command line

"Matthew Peter" <survivedsushi@yahoo.com> wrote in message
news:20051005074002.27199.qmail@web35203.mail.mud.yahoo.com...

Show quoted text

There a way to watch queries execute on the pgsql
server as queries come in from the network and are
processed?

Thanks
MP

__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq