pg_ctl emits strange warning message

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pg_ctl emits strange warning message
Дата
Msg-id AANLkTi=rBTeY4pxHF03KkNQAPPzT1J8RG=j6Ee-XgpMA@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_ctl emits strange warning message  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Hi,

http://archives.postgresql.org/pgsql-hackers/2010-05/msg00921.php
>>> (2)
>>> pg_ctl -ms stop emits the following warning whenever there is the
>>> backup_label file in $PGDATA.
>>>
>>>      WARNING: online backup mode is active
>>>      Shutdown will not complete until pg_stop_backup() is called.
>>>
>>> This warning doesn't fit in with the shutdown during recovery case.
>>> Since smart shutdown might be requested by other than pg_ctl, the
>>> warning should be emitted in server side rather than client, I think.
>>> How about moving the warning to the server side?
>>
>> Hmm, I'm not sure whether that's a good idea or not.  Perhaps we
>> should discuss for 9.1?
>
> Okay, this is not a critical problem.

Let's revisit this issue. The problem here is that pg_ctl might emit
the following warning messages when it shuts down the standby server.
This is very strange thing since online backup mode is never active
in the standby.

    WARNING: online backup mode is active
    Shutdown will not complete until pg_stop_backup() is called.

Another problem is that the above useful messages are not emitted
when shutdown is requested by other than pg_ctl.

The attached patch moves the warning from pg_ctl to the server side
and makes postmaster emit it only when online backup mode is really
active. This can urge users to call pg_stop_backup to complete smart
shutdown whenever it's requested during online backup. I added the
patch into the next CF.

Comments?

Regards,

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

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Perf regression in 2.6.32 (Ubuntu 10.04 LTS)
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Reducing walreceiver latency with a latch