Re: Exposing currentTransactionWALVolume - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Exposing currentTransactionWALVolume
Date
Msg-id CA+U5nMJq7D8GAkQDeaQFjRCKja5BGj1e9zewf+6AveoEeSXpKg@mail.gmail.com
Whole thread Raw
In response to Re: Exposing currentTransactionWALVolume  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On 31 January 2014 13:56, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Wed, Jan 15, 2014 at 2:12 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Short patch to expose a function GetCurrentTransactionWALVolume() that
>> gives the total number of bytes written to WAL by current transaction.
>
> Could you tell me the use case of this function? ISTM that it's less
> useful in the real
> world because it reports the information of WAL generated only in my own current
> transaction. For example, the monitoring tool cannot see that
> information because
> it's the different session from the target.

It's already possible to work out how much total WAL has been
generated. Monitoring tools may access that.

What this allows is user/plugin code to see how much WAL has been
generated in this transaction and take different user defined actions.
Those actions would be specific to the transaction, so this is more
about production control applications than overall system monitoring.
There are many possible ways to use that knowledge.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary
Next
From: Andres Freund
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary