Open
Description
The following query keeps returning NaN
SELECT extract(epoch from now() - pg_last_xact_replay_timestamp())::int AS last_replay_time
I'm able to run this query as a non-superuser in the database and get results back, but I checked using a security definer function and it returns NaN as well
CREATE OR REPLACE FUNCTION monitor.replica_replay_time_lag() RETURNS TABLE (last_replay_time int)
LANGUAGE SQL SECURITY DEFINER
AS $$
SELECT extract(epoch from now() - pg_last_xact_replay_timestamp())::int AS last_replay_time
$$;