On 2021/03/06 5:37, Alvaro Herrera wrote:
On 2021-Mar-05, James Coleman wrote:

Do you have any thoughts on what you'd like to see the message be? I
could change the PM_RECOVERY (without hot standby enabled) to return
CAC_RECOVERY which would give us the message "the database system is
in recovery mode", but that would be a change from what that state
returns now in a way that's unrelated to the goal of the patch.

Here's an idea:

* hot_standby=on, before reaching consistent state
   FATAL:  database is not accepting connections
   DETAIL:  Consistent state has not yet been reached.

* hot_standby=off, past consistent state
   FATAL:  database is not accepting connections
   DETAIL:  Hot standby mode is disabled.

* hot_standby=off, before reaching consistent state
   FATAL:  database is not accepting connections

This idea looks good to me!


   DETAIL:  Hot standby mode is disabled.
   or maybe
   DETAIL:  Consistent state has not yet been reached, and hot standby mode is 
disabled.

I prefer the former message. Because the latter message meams that
we need to output the different messages based on whether the consistent
state is reached or not, and the followings would be necessary to implement
that. This looks a bit overkill to me against the purpose, at least for me.

- The startup process needs to send new signal
  (e.g., PMSIGNAL_RECOVERY_CONSISTENT) to postmaster when the consistent
  state has been reached, to let postmaster know that state.

- When receiving that signal, postmaster needs to move its state to new state
  (e.g., PM_CONSISTENT).

Regards,

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


Reply via email to