Re: Is Recovery actually paused?

Dilip Kumar <dilipbalaut@gmail.com>

From: Dilip Kumar <dilipbalaut@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Yugo Nagata <nagata@sraoss.co.jp>, Masahiko Sawada <sawada.mshk@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Simon Riggs <simon@2ndquadrant.com>
Date: 2021-02-25T04:19:15Z
Lists: pgsql-hackers

Attachments

On Thu, Feb 25, 2021 at 6:52 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:

> Recently we have mildly changed to the direction to utilize the
> compiler warning about enum coverage in switch struct. (Maybe we need
> another compiler option that enables that check for switch'es with the
> default case, though.) In that light, the direction is a switch
> without the default case then Assert if none of the cases is stepped
> on. This is what apply_dispatch does. Slightly different version of
> the same would be the following.  This is more natural than the above.
>
>   statestr = NULL;
>   swtich(state)
>   {
>     case RECOVERY_NOT_PAUSED:
>       statestr = "not paused";
>       break;
>     ...
>   }
>
>   Assert (statestr != NULL);
>   return cstring_to_text(statestr);
>
> If the enum had many (more than ten or so?) values and it didn't seem
> stable I push that a bit strongly but it actually consists of only
> three values and not likely to get further values.  So I don't insist
> on the style so strongly here.
>

Changed as per the suggestion.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Commits

  1. Be clear about whether a recovery pause has taken effect.

  2. Pause recovery for insufficient parameter settings

  3. Remove most volatile qualifiers from xlog.c