Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a21215

Browse files
committed
Handle critical errors (not completed)
1 parentb15877e commit2a21215

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

‎contrib/mmts/multimaster.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,23 @@ void MtmAbortTransaction(MtmTransState* ts)
10151015
* -------------------------------------------
10161016
*/
10171017

1018+
voidMtmHandleApplyError(void)
1019+
{
1020+
ErrorData*edata=CopyErrorData();
1021+
switch (edata->sqlerrcode) {
1022+
caseERRCODE_DISK_FULL:
1023+
caseERRCODE_INSUFFICIENT_RESOURCES:
1024+
caseERRCODE_IO_ERROR:
1025+
caseERRCODE_DATA_CORRUPTED:
1026+
caseERRCODE_INDEX_CORRUPTED:
1027+
caseERRCODE_SYSTEM_ERROR:
1028+
caseERRCODE_INTERNAL_ERROR:
1029+
caseERRCODE_OUT_OF_MEMORY:
1030+
break;
1031+
}
1032+
}
1033+
1034+
10181035
voidMtmRecoveryCompleted(void)
10191036
{
10201037
MTM_LOG1("Recovery of node %d is completed",MtmNodeId);

‎contrib/mmts/multimaster.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,5 +238,6 @@ extern void MtmCheckQuorum(void);
238238
externboolMtmRecoveryCaughtUp(intnodeId,XLogRecPtrslotLSN);
239239
externvoidMtmRecoveryCompleted(void);
240240
externvoidMtmMakeTableLocal(char*schema,char*name);
241+
externvoidMtmHandleApplyError(void);
241242

242243
#endif

‎contrib/mmts/pglogical_apply.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ void MtmExecutor(int id, void* work, size_t size)
951951
}
952952
PG_CATCH();
953953
{
954+
MtmHandleApplyError();
954955
EmitErrorReport();
955956
FlushErrorState();
956957
MTM_LOG2("%d: REMOTE begin abort transaction %d",MyProcPid,MtmGetCurrentTransactionId());

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp