|
245 | 245 | #defineSxactIsReadOnly(sxact) (((sxact)->flags & SXACT_FLAG_READ_ONLY) != 0) |
246 | 246 | #defineSxactHasSummaryConflictIn(sxact) (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_IN) != 0) |
247 | 247 | #defineSxactHasSummaryConflictOut(sxact) (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_OUT) != 0) |
| 248 | +/* |
| 249 | + * The following macro actually means that the specified transaction has a |
| 250 | + * conflict out *to a transaction which committed ahead of it*. It's hard |
| 251 | + * to get that into a name of a reasonable length. |
| 252 | + */ |
248 | 253 | #defineSxactHasConflictOut(sxact) (((sxact)->flags & SXACT_FLAG_CONFLICT_OUT) != 0) |
249 | 254 | #defineSxactIsDeferrableWaiting(sxact) (((sxact)->flags & SXACT_FLAG_DEFERRABLE_WAITING) != 0) |
250 | 255 | #defineSxactIsROSafe(sxact) (((sxact)->flags & SXACT_FLAG_RO_SAFE) != 0) |
@@ -2708,7 +2713,7 @@ SetNewSxactGlobalXmin(void) |
2708 | 2713 | * up in some relatively timely fashion. |
2709 | 2714 | * |
2710 | 2715 | * If this transaction is committing and is holding any predicate locks, |
2711 | | - * it must be added to a list of completed serializabletransaction still |
| 2716 | + * it must be added to a list of completed serializabletransactions still |
2712 | 2717 | * holding locks. |
2713 | 2718 | */ |
2714 | 2719 | void |
@@ -2753,12 +2758,13 @@ ReleasePredicateLocks(const bool isCommit) |
2753 | 2758 | LWLockAcquire(SerializableXactHashLock,LW_EXCLUSIVE); |
2754 | 2759 |
|
2755 | 2760 | /* |
2756 | | - * We don't hold a lock here, assuming that TransactionId is atomic! |
| 2761 | + * We don't hold XidGenLock lock here, assuming that TransactionId is |
| 2762 | + * atomic! |
2757 | 2763 | * |
2758 | 2764 | * If this value is changing, we don't care that much whether we get the |
2759 | 2765 | * old or new value -- it is just used to determine how far |
2760 | | - * GlobalSerizableXmin must advance before this transaction can becleaned |
2761 | | - *fullycleaned up. The worst that could happen is we wait forome more |
| 2766 | + * GlobalSerizableXmin must advance before this transaction can befully |
| 2767 | + * cleaned up. The worst that could happen is we wait forone more |
2762 | 2768 | * transaction to complete before freeing some RAM; correctness of visible |
2763 | 2769 | * behavior is not affected. |
2764 | 2770 | */ |
@@ -3860,8 +3866,8 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader, |
3860 | 3866 | * Because T2 must've committed first, there is no anomaly if: |
3861 | 3867 | * - the reader committed before T2 |
3862 | 3868 | * - the writer committed before T2 |
3863 | | - * - the reader is a READ ONLY transaction and the reader wasnot |
3864 | | - * concurrentwith T2 (= reader acquired its snapshotafter T2 committed) |
| 3869 | + * - the reader is a READ ONLY transaction and the reader wasconcurrent |
| 3870 | + *with T2 (= reader acquired its snapshotbefore T2 committed) |
3865 | 3871 | */ |
3866 | 3872 | if (!failure) |
3867 | 3873 | { |
|