Re: Coding TODO for 8.4: Synch Rep

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Coding TODO for 8.4: Synch Rep
Date: 2008-12-18 03:25:58
Message-ID: 20081218120728.AB0A.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Fujii Masao" <masao(dot)fujii(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2008-12-18 03:26:33 Re: DTrace probes patch
Previous Message Fujii Masao 2008-12-18 03:08:40 Re: Sync Rep: First Thoughts on Code