From: Koichi S. <ko...@in...> - 2012-07-23 04:05:37
|
Thanks. I found the latter works for the master. --- Koichi On Mon, 23 Jul 2012 12:53:50 +0900 Michael Paquier <mic...@gm...> wrote: > > 2. select application_name,upper(state),upper(sync_state) from > > pg_stat_replication; > > > > This does not work. pg_stat_replication has zero row. > > > Because this is datanode slave, we don't have GTM connection or > > snapshot. This might be a cause of the problem 2, or we might have > > blocked to update pg_stat_replication system catalog. > > > pg_stat_replication has by definition one row per wal sender process: > http://www.postgresql.org/docs/9.1/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE > AFAIK, slave has no wal sender processes running, so it is normal to see > nothing on the slave side, all the data is on the master side. The data is > only available on master, Am I missing smth? > You might be able to see rows in pg_stat_replication on a slave if you use > cascading replication however, but this feature is only available in 9.2. > Also, in the case of XC, you can use EXECUTE DIRECT to get the information > of pg_stat_replication from remote nodes, Coordinators and Datanodes > included. > -- > Michael Paquier > http://michael.otacoo.com |