Re: Coding TODO for 8.4: Synch Rep

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Coding TODO for 8.4: Synch Rep
Дата
Msg-id 20081218120728.AB0A.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Coding TODO for 8.4: Synch Rep  ("Fujii Masao" <masao.fujii@gmail.com>)
Список pgsql-hackers
"Fujii Masao" <masao.fujii@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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Fujii Masao"
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code
Следующее
От: "Fujii Masao"
Дата:
Сообщение: Re: DTrace probes patch