Re: Exposing currentTransactionWALVolume

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exposing currentTransactionWALVolume
Date: 2014-01-31 14:41:12
Message-ID: CA+U5nMJq7D8GAkQDeaQFjRCKja5BGj1e9zewf+6AveoEeSXpKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31 January 2014 13:56, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Jan 15, 2014 at 2:12 AM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-01-31 14:45:17 Re: jsonb and nested hstore
Previous Message Greg Stark 2014-01-31 14:39:47 Re: Recovery inconsistencies, standby much larger than primary