Re: make pg_ctl more friendly

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: make pg_ctl more friendly
Дата
Msg-id ed72e7aa-d19c-43ea-888b-3449632d944b@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: make pg_ctl more friendly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 2024/07/19 2:58, Tom Lane wrote:
> Fujii Masao <masao.fujii@oss.nttdata.com> writes:
>> "because of recovery target settings" isn't always accurate.
>> For example, if the DBA shuts down the server during recovery,
>> POSTMASTER_SHUTDOWN_IN_RECOVERY can be returned regardless of
>> the recovery target settings. Should we change the message to
>> something like "server shut down in recovery" for accuracy?
> 
> Hmm, I just pushed it with Laurenz's wording.  I don't mind
> if we change it again, but I'm not sure that there's much
> wrong with it as it stands.  Keep in mind that the context
> is the DBA doing "pg_ctl start".  It seems unlikely that
> he/she would concurrently do "pg_ctl stop".  Even if that
> did happen, do we really need to phrase the message to account
> for it?
> 
> I like Laurenz's wording because it points the user in the
> direction of the settings that would need adjustment if an
> immediate shutdown wasn't what was expected/wanted.  If we
> just say "shut down in recovery", that may be accurate,
> but it offers little help as to what to do next.

I was thinking the scenario where "pg_ctl -w start" exits due to
a recovery target setting, especially with recovery_target_action=shutdown,
can happen not so many times. This is because the server typically
can reach PM_STATUS_READY or PM_STATUS_STANDBY,
and pg_ctl exits normally before the recovery target is reached.

On the other thand, if users start the crash recovery and find
misconfiguration of parameter requiring a server restart,
they might shut down the server during recovery to fix it.
In this case, mentioning "recovery target" could be confusing.
This scenario also might not be so common, but seems a bit more
likely than the recovery target case. I understand this might be
a minority opinion, though..

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: Adding OLD/NEW support to RETURNING
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Make COPY format extendable: Extract COPY TO format implementations