| 548 | } |
| 549 | |
| 550 | static void |
| 551 | doNotifyingOnePhaseCommit(void) |
| 552 | { |
| 553 | bool succeeded; |
| 554 | |
| 555 | if (MyTmGxactLocal->dtxSegments == NIL) |
| 556 | return; |
| 557 | |
| 558 | elog(DTM_DEBUG5, "doNotifyingOnePhaseCommit entering in state = %s", DtxStateToString(MyTmGxactLocal->state)); |
| 559 | |
| 560 | Assert(MyTmGxactLocal->state == DTX_STATE_ONE_PHASE_COMMIT); |
| 561 | setCurrentDtxState(DTX_STATE_NOTIFYING_ONE_PHASE_COMMIT); |
| 562 | |
| 563 | succeeded = currentDtxDispatchProtocolCommand(DTX_PROTOCOL_COMMAND_COMMIT_ONEPHASE, true); |
| 564 | if (!succeeded) |
| 565 | { |
| 566 | /* If error is not thrown after failure then we have to throw it. */ |
| 567 | Assert(MyTmGxactLocal->state == DTX_STATE_NOTIFYING_ONE_PHASE_COMMIT); |
| 568 | ereport(ERROR, |
| 569 | (errmsg("one phase commit notification failed"), |
| 570 | TM_ERRDETAIL)); |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | static void |
| 575 | doNotifyingCommitPrepared(void) |
no test coverage detected