master-side counterpart of pg_last_xact_replay_timestamp?

From: Chris Redekop <chris(at)replicon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: master-side counterpart of pg_last_xact_replay_timestamp?
Date: 2011-09-07 22:06:53
Message-ID: CAC2SuRJ6A_gnNKb_J0jgVtfyEEae0YK4f53jxMk33TVEWz7aUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there anything available to get the last time a transaction
occurred?....like say "pg_last_xact_timestamp"? In order to accurately
calculate how far behind my slave is I need to do something like
master::pg_last_xact_timestamp() -
slave::pg_last_xact_replay_timestamp()....currently I'm using now() instead
of the pg_last_xact_timestamp() call, but then when the master is not busy
the slave appears to lag behind. I'm considering writing a C module to get
the last modified file time of the xlog, but I'm hoping there is a better
alternative that I haven't found yet....

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joy Smith 2011-09-07 22:25:25 pivoting data?
Previous Message David Johnston 2011-09-07 22:02:45 Re: Problem using PostgreSQL 9.0.4 with Java