Re: Exposing currentTransactionWALVolume

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exposing currentTransactionWALVolume
Date: 2014-02-15 14:04:12
Message-ID: 20140215140412.GI20973@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Simon,

On 2014-01-14 17:12:35 +0000, Simon Riggs wrote:
> /*
> - * MarkCurrentTransactionIdLoggedIfAny
> + * ReportTransactionInsertedWAL
> *
> - * Remember that the current xid - if it is assigned - now has been wal logged.
> + * Remember that the current xid - if it is assigned - has now inserted WAL
> */
> void
> -MarkCurrentTransactionIdLoggedIfAny(void)
> +ReportTransactionInsertedWAL(uint32 insertedWALVolume)
> {
> + currentTransactionWALVolume += insertedWALVolume;
> if (TransactionIdIsValid(CurrentTransactionState->transactionId))
> CurrentTransactionState->didLogXid = true;
> }

Not a big fan of combining those two. One works on the toplevel
transaction, the other on the current subtransaction... The new name
also ignores that it's only taking effect if there's actually a
transaction in progress.

Greetings,

Andres Freund

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Beck 2014-02-15 14:06:39 Re: New hook after raw parsing, before analyze
Previous Message Andres Freund 2014-02-15 13:51:15 Re: Create function prototype as part of PG_FUNCTION_INFO_V1