File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
- PostgreSQL Database Management System
1
+ pPostgreSQL Database Management System
2
2
=====================================
3
3
4
4
This directory contains the source code distribution of the PostgreSQL
Original file line number Diff line number Diff line change @@ -167,7 +167,8 @@ char const* const MtmNodeStatusMnem[] =
167
167
"Connected" ,
168
168
"Online" ,
169
169
"Recovery" ,
170
- "InMinor"
170
+ "InMinor" ,
171
+ "OutOfService"
171
172
};
172
173
173
174
bool MtmDoReplication ;
@@ -1026,8 +1027,11 @@ void MtmHandleApplyError(void)
1026
1027
case ERRCODE_INDEX_CORRUPTED :
1027
1028
case ERRCODE_SYSTEM_ERROR :
1028
1029
case ERRCODE_INTERNAL_ERROR :
1029
- case ERRCODE_OUT_OF_MEMORY :
1030
- break ;
1030
+ case ERRCODE_OUT_OF_MEMORY :
1031
+ elog (WARNING , "Node is excluded from cluster because of non-recoverable error %d" , edata -> sqlerrcode );
1032
+ MtmSwitchClusterMode (MTM_OUT_OF_SERVICE );
1033
+ kill (PostmasterPid , SIGQUIT );
1034
+ break ;
1031
1035
}
1032
1036
}
1033
1037
Original file line number Diff line number Diff line change @@ -97,11 +97,12 @@ typedef enum
97
97
typedef enum
98
98
{
99
99
MTM_INITIALIZATION , /* Initial status */
100
- MTM_OFFLINE , /* Node is out of quorum */
100
+ MTM_OFFLINE , /* Node is excluded from cluster */
101
101
MTM_CONNECTED , /* Arbiter is established connections with other nodes */
102
102
MTM_ONLINE , /* Ready to receive client's queries */
103
103
MTM_RECOVERY , /* Node is in recovery process */
104
- MTM_IN_MINORITY /* Node is out of quorum */
104
+ MTM_IN_MINORITY , /* Node is out of quorum */
105
+ MTM_OUT_OF_SERVICE /* Node is not avaiable to to critical, non-recoverable error */
105
106
} MtmNodeStatus ;
106
107
107
108
typedef enum
You can’t perform that action at this time.
0 commit comments