"Fujii Masao" <masao.fu...@gmail.com> wrote: > > ISTM we should offer a simple boolean function which says whether > > streaming replication is connected or not. If people want to defer > > connection until replication is connected then they can create a more > > complex startup script, just as they do to ensure correct sequence of > > all the required services already. > > OK, I wiil add that function. > > Name: pg_is_in_replication > Args: None > Returns: boolean > Description: whether replication is in progress
It might not be an item for 8.4, we'd better to provide a method to query information about standby servers something like: - IP address of the standby server. - Time of the connection established. - Statistics information of replication. - # of sent bytes - average response time etc... Those information will be two or more rows when we support multiple standby servers. So, the method should be an system view (like pg_standby_servers), not a scalar function. If there were the view, pg_is_in_replication() could be defined as "SELECT count(*) > 0 FROM pg_standby_servers" . However, pg_is_in_replication() is enough for 8.4, so I think it has low priority. IP address of standby can be retrived with ps command already. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers