|
245 | 245 | #define SxactIsReadOnly(sxact) (((sxact)->flags & SXACT_FLAG_READ_ONLY) != 0)
|
246 | 246 | #define SxactHasSummaryConflictIn(sxact) (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_IN) != 0)
|
247 | 247 | #define SxactHasSummaryConflictOut(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 | #define SxactHasConflictOut(sxact) (((sxact)->flags & SXACT_FLAG_CONFLICT_OUT) != 0)
|
249 | 254 | #define SxactIsDeferrableWaiting(sxact) (((sxact)->flags & SXACT_FLAG_DEFERRABLE_WAITING) != 0)
|
250 | 255 | #define SxactIsROSafe(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 serializable transaction still |
| 2716 | + * it must be added to a list of completed serializable transactions 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 be cleaned |
2761 |
| - * fully cleaned up. The worst that could happen is we wait for ome more |
| 2766 | + * GlobalSerizableXmin must advance before this transaction can be fully |
| 2767 | + * cleaned up. The worst that could happen is we wait for one 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 was not |
3864 |
| - * concurrent with T2 (= reader acquired its snapshot after T2 committed) |
| 3869 | + * - the reader is a READ ONLY transaction and the reader was concurrent |
| 3870 | + * with T2 (= reader acquired its snapshot before T2 committed) |
3865 | 3871 | */
|
3866 | 3872 | if (!failure)
|
3867 | 3873 | {
|
|
0 commit comments