Fix silly mistake in Assert
authorAlvaro Herrera <[email protected]>
Tue, 4 Jan 2022 16:21:23 +0000 (13:21 -0300)
committerAlvaro Herrera <[email protected]>
Tue, 4 Jan 2022 16:21:23 +0000 (13:21 -0300)
src/backend/access/heap/heapam.c

index 922378feddc55b7a2e838c97bb44f2a20dacee50..144bbcdfe7c8dd2ccf9d798d52a454bd44528951 100644 (file)
@@ -5095,7 +5095,8 @@ failed:
         * this assert is slightly different from the equivalent one in
         * heap_delete and heap_update.
         */
-       Assert(HeapTupleWouldBlock || !(tuple->t_data->t_infomask & HEAP_XMAX_INVALID));
+       Assert((result == HeapTupleWouldBlock) ||
+              !(tuple->t_data->t_infomask & HEAP_XMAX_INVALID));
        hufd->ctid = tuple->t_data->t_ctid;
        hufd->xmax = HeapTupleHeaderGetUpdateXid(tuple->t_data);
        if (result == HeapTupleSelfUpdated)