| From: | Torsten Förtsch <torsten(dot)foertsch(at)gmx(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | pg_stat_replication in 9.3 |
| Date: | 2014-09-14 12:03:08 |
| Message-ID: | 541583FC.8090909@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
I noticed a strange behaviour regarding pg_stat_replication in 9.3. If
called from psql using the \watch command, I see all my replicas. From
time to time one of them drops out and reconnects in a short period of
time, typically ~30 sec.
If I use the same select in plpgsql like:
FOR r in SELECT application_name,
client_addr,
flush_location, clock_timestamp() AS lmd
FROM pg_stat_replication
ORDER BY application_name, client_addr
LOOP
RAISE NOTICE 'aname=%, ca=%, lmd=%, loc=%, cur=%, lag=%',
r.application_name, r.client_addr, r.lmd,
r.flush_location,
pg_current_xlog_location(),
pg_size_pretty(
pg_xlog_location_diff(
pg_current_xlog_location(),
r.flush_location
)
);
END LOOP;
I see one of the replicas dropping out but never coming back again while
in a parallel session using psql and \watch it indeed does come back.
Is that intended?
Torsten
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2014-09-14 13:23:37 | Re: 2 left joins causes seqscan |
| Previous Message | Bruce Momjian | 2014-09-14 00:52:42 | Re: After upgrade from 9.2.9 to 9.3.5 got reduced contention |