Monitoring postgres transaction

Hi I would like to monitor postgres transactions in a realtime fashion,
is
there a library I can use to help me facilitate this functionality

Gian H. wrote:

Hi I would like to monitor postgres transactions in a realtime fashion, is
there a library I can use to help me facilitate this functionality

Explain what you mean by monitor.

I would like to display queries live

You could use Wireshark to look at the packets going from your
application to the postgresql server.

Wireshark has a ‘real time’ mode. It also has parsers built-in which
interpret the bits in each packet.

Bob G

On Sun, 2008-01-27 at 03:26 +0900, Bob G. wrote:

I would like to display queries live

Explain what you mean by monitor.
While I’m not aware of a ruby library for this, the API for postgresql
certainly offers support for notifications:

http://www.postgresql.org/docs/8.1/static/libpq-notify.html

The example linked from that page shows C code that gets notified on
actions on a particular table.

HTH,

Felix

Gian H. wrote:

With the proper configuration flags turned on, you can query internal
postgresql
table(s) for running queries. But, short lived queries will probably be
in and
out of the table(s) too fast to be seen.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs