Re: [PATCH] add --throttle to pgbench (submission 3)

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Greg Smith <greg(at)2ndQuadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] add --throttle to pgbench (submission 3)
Date: 2013-06-09 13:25:54
Message-ID: 20130609132554.GA1456@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-06-09 17:50:13 +0800, Craig Ringer wrote:
> On 05/31/2013 03:41 PM, Fabien COELHO wrote:
> >
> >>> However I'm not sure that pg_stat_replication currently has the
> >>> necessary information on either side to measure the lag (in time
> >>> transactions, but how do I know when a transaction was committed? or
> >>> number of transactions?).
> >>
> >> The BDR codebase now has a handy function to report when a transaction
> >> was committed, pg_get_transaction_committime(xid) .
> >
> > This looks handy for monitoring a replication setup.
> > It should really be in core...
> >
> > Any plans? Or is there other ways to get this kind of information in
> > core?

> pg_get_transaction_committime isn't trivial to just add to core because
> it requires a commit time to be recorded with commit records in the
> transaction logs, among other changes.

The commit records actually already have that information available
(c.f. xl_xact_commit(_compact) in xact.h), the problem is having a
datastructure which collects all that.
That's why the committs (written by Alvaro) added an slru mapping xids
to timestamps. And yes, we want to submit that sometime.

The pg_xlog_wait_remote_apply(), pg_xlog_wait_remote_receive() functions
however don't need any additional infrastructure, so I think those are
easier and less controversial to add.

Greetings,

Andres Freund

--
Andres Freund 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 2013-06-09 13:51:06 Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding
Previous Message Andres Freund 2013-06-09 13:08:18 Re: MVCC catalog access