Re: Exposing currentTransactionWALVolume

From: KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exposing currentTransactionWALVolume
Date: 2014-02-17 10:14:43
Message-ID: 5301E113.2090109@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/02/15 23:04), Andres Freund wrote:
> 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.
Oh, yes. I don't have good idea, but we need to change function name or add new
function for WAL adding volume. If it will be fixed, I set ready for commiter,
because I cannot see any bad point in this patch.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2014-02-17 10:51:30 Re: narwhal and PGDLLIMPORT
Previous Message Sergey Muraviov 2014-02-17 10:05:38 Re: Problem with displaying "wide" tables in psql