Re: [GENERAL] NOTIFY command impact - Mailing list pgsql-general

From Benoit Lobréau
Subject Re: [GENERAL] NOTIFY command impact
Date
Msg-id CAPE8EZ6Zqbi5Mx+MAEo=dFYk0ngJvBbC6zUudBmq123YBOjJXQ@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] NOTIFY command impact  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [GENERAL] NOTIFY command impact  (Rob Brucks <rob.brucks@rackspace.com>)
List pgsql-general
Hi, 

I might have missed something. 
This should be enough to solve the problem no ?

SELECT
CASE
WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location() THEN 0
 ELSE EXTRACT (EPOCH FROM now() - pg_last_xact_replay_timestamp())::INTEGER
END
AS replication_lag;

Benoit.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Foreign key references a unique index instead of aprimary key
Next
From: Thomas Güttler
Date:
Subject: Re: [GENERAL] Move rows from one database to other