Re: Patch pg_is_in_backup()

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Patch pg_is_in_backup()
Дата
Msg-id CAHGQGwE_5weEW_WmKuHgjshAmgWtuENdtbgXt8y48-ip+J--MQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch pg_is_in_backup()  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Fri, Feb 3, 2012 at 6:52 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Fri, Feb 3, 2012 at 10:47, Fujii Masao <masao.fujii@gmail.com> wrote:
>> On Fri, Feb 3, 2012 at 6:10 PM, Bernd Helmle <mailings@oopsware.de> wrote:
>>>
>>>
>>> --On 3. Februar 2012 13:21:11 +0900 Fujii Masao <masao.fujii@gmail.com>
>>> wrote:
>>>
>>>> It seems to be more user-friendly to introduce a view like pg_stat_backup
>>>> rather than the function returning an array.
>>>
>>>
>>> I like this idea. A use case i saw for monitoring backup_label's in the
>>> past, was mainly to discover a forgotten exclusive pg_stop_backup() (e.g.
>>> due to broken backup scripts). If the view would be able to distinguish
>>> both, exclusive and non-exclusive backups, this would be great.
>>
>> Agreed. Monitoring an exclusive backup is very helpful. But I wonder
>> why we want to monitor non-exclusive backup. Is there any use case?
>
> Actually, we can already monitor much of the non-exclusive one through
> pg_stat_replication. Including the info on when it was started (at
> least in almost every case, that will be more or less the
> backend_start time for that one)

Right.

>> If we want to monitor non-exclusive backup, why not pg_dump backup?
>
> .. which we can also monitor though pg_stat_activity by looking at
> application_name (which can be faked of course, but still)

Yep.

>> If there is no use case, it seems sufficient to implement the function
>> which reports the information only about exclusive backup.
>
> Yeah, thinking more of it, i think I agree. But the function should
> then probably be named in such a way that it's clear that we're
> talking about exclusive backups, e.g. not pg_is_in_backup() but
> instead pg_is_in_exclusive_backup() (renamed if we change it to return
> the timestamp instead, of course, but you get the idea)

Agreed.

Regards,

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


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Patch pg_is_in_backup()
Следующее
От: Christian Ullrich
Дата:
Сообщение: Re: ecpglib use PQconnectdbParams