Skip to content

Commit 1c164ef

Browse files
committed
Remove useless Assert.
Testing that an unsigned variable is >= 0 is pretty pointless, as noted by Coverity and numerous buildfarm members. In passing, add comment about new uses of "volatile" --- Coverity doesn't much like that either, but it seems probably necessary.
1 parent 20e7e1f commit 1c164ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,9 @@ ReorderBufferResetTXN(ReorderBuffer *rb, ReorderBufferTXN *txn,
19071907
* merge) and replay the changes in lsn order.
19081908
*
19091909
* If streaming is true then data will be sent using stream API.
1910+
*
1911+
* Note: "volatile" markers on some parameters are to avoid trouble with
1912+
* PG_TRY inside the function.
19101913
*/
19111914
static void
19121915
ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn,
@@ -2762,7 +2765,6 @@ ReorderBufferChangeMemoryUpdate(ReorderBuffer *rb,
27622765
}
27632766

27642767
Assert(txn->size <= rb->size);
2765-
Assert((txn->size >= 0) && (rb->size >= 0));
27662768
}
27672769

27682770
/*

0 commit comments

Comments
 (0)