Re: How to get no. of commits/rollbacks by application on the database? - Mailing list pgsql-general

From Craig Ringer
Subject Re: How to get no. of commits/rollbacks by application on the database?
Date
Msg-id 4FE14E36.7070609@ringerc.id.au
Whole thread Raw
In response to How to get no. of commits/rollbacks by application on the database?  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Responses Re: How to get no. of commits/rollbacks by application on the database?
List pgsql-general
On 06/19/2012 09:08 PM, Raghavendra wrote:

 > How can we figure out no. of commit/rollback happend on the database
 > by application ?
 >
> If am a DBA, how to know exact application or user commits/rollbacks
> happened on the database without enabling logs.

This sounds like one of those "what are you trying to achieve"
questions, where you need to step back and ask why you're trying to
collect that info and what you want it for.

First, how do you define "application"? Any client that connects to a
given database? Any client that sets the application_name GUC to a
particular value? Any client from a given host? etc. "Application" can
mean a lot of different things. It sounds like you might simply mean
work done on a connection that isn't internal to the database system's
bookkeeping, which is a bit easier, but I'm not sure.

Second, why? What does the transaction count tell you? How will you
account for work done by PgAgent (if used), via dblink, etc?

I guess I'm unsure what you're trying to accomplish.

--
Craig Ringer

pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: Re: Feature discussion: Should syntax errors abort a transaction?
Next
From: Simon Riggs
Date:
Subject: Re: Feature discussion: Should syntax errors abort a transaction?