Обсуждение: ps display "waiting for max_standby_delay"

Поиск
Список
Период
Сортировка

ps display "waiting for max_standby_delay"

От
Takahiro Itagaki
Дата:
Hi,

We have codes to change ps display for recovery process during hot standby.
The current code always shows max_standby_delay for the message, but how
about showing actual waiting time instead? Since DBAs can always get the
parameter from postgresql.conf they wrote, so the parameter value itself
is not so useful. Actual waiting time might be more useful to determine
which values to be set to max_standby_delay, no?

[backend/storage/ipc/standby.c]   snprintf(new_status + len, 50,            " waiting for max_standby_delay (%d ms)",
        MaxStandbyDelay);  ==> GetCurrentTimestamp() - waitStart   set_ps_display(new_status, false);
 

I think SQL-based activity view will be more useful than ps display,
but it's an item for 9.1.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center



Re: ps display "waiting for max_standby_delay"

От
Bruce Momjian
Дата:
Takahiro Itagaki wrote:
> Hi,
> 
> We have codes to change ps display for recovery process during hot standby.
> The current code always shows max_standby_delay for the message, but how
> about showing actual waiting time instead? Since DBAs can always get the
> parameter from postgresql.conf they wrote, so the parameter value itself
> is not so useful. Actual waiting time might be more useful to determine
> which values to be set to max_standby_delay, no?
> 
> [backend/storage/ipc/standby.c]
>     snprintf(new_status + len, 50,
>              " waiting for max_standby_delay (%d ms)",
>              MaxStandbyDelay);  ==> GetCurrentTimestamp() - waitStart
>     set_ps_display(new_status, false);
> 
> I think SQL-based activity view will be more useful than ps display,
> but it's an item for 9.1.

Sounds interesting, but how often would the ps statust display be
updated?  I hope not too often.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + None of us is going to be here forever. +


Re: ps display "waiting for max_standby_delay"

От
Takahiro Itagaki
Дата:
Bruce Momjian <bruce@momjian.us> wrote:

> > how about showing actual waiting time instead? 
> >              " waiting for max_standby_delay (%d ms)",
> >              MaxStandbyDelay)
> 
> Sounds interesting, but how often would the ps statust display be
> updated?  I hope not too often.

We can change the interval of updates to 500ms or so if do it,
but I rethink ps display is not the best place for the information.

I'd like to modify the additonal message "waiting for max_standby_delay"
just to "waiting", because we don't use "waiting for statement_timeout"
for normal queries.

If we need additional information about conflictions in recovery,
we would supply them with SQL views instead of ps display in 9.1.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




Re: ps display "waiting for max_standby_delay"

От
Fujii Masao
Дата:
On Fri, Jun 11, 2010 at 11:20 AM, Takahiro Itagaki
<itagaki.takahiro@oss.ntt.co.jp> wrote:
>
> Bruce Momjian <bruce@momjian.us> wrote:
>
>> > how about showing actual waiting time instead?
>> >              " waiting for max_standby_delay (%d ms)",
>> >              MaxStandbyDelay)
>>
>> Sounds interesting, but how often would the ps statust display be
>> updated?  I hope not too often.
>
> We can change the interval of updates to 500ms or so if do it,
> but I rethink ps display is not the best place for the information.
>
> I'd like to modify the additonal message "waiting for max_standby_delay"
> just to "waiting", because we don't use "waiting for statement_timeout"
> for normal queries.

+1

I don't think that it's useful to display the value of max_standby_delay.

> If we need additional information about conflictions in recovery,
> we would supply them with SQL views instead of ps display in 9.1.

+1

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center