aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-08-09 11:32:31 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-08-09 11:32:31 -0400
commit1c164ef3d28dfab445a885a03e80cfd0d552f64a (patch)
tree469148b129e6b3aeca533a55f29296d70644fbd5 /src
parent20e7e1fe316467720d8d062e1a1429f798fc31bf (diff)
downloadpostgresql-1c164ef3d28dfab445a885a03e80cfd0d552f64a.tar.gz
postgresql-1c164ef3d28dfab445a885a03e80cfd0d552f64a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 5b7afe6d9e9..1975d629a6e 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1907,6 +1907,9 @@ ReorderBufferResetTXN(ReorderBuffer *rb, ReorderBufferTXN *txn,
* merge) and replay the changes in lsn order.
*
* If streaming is true then data will be sent using stream API.
+ *
+ * Note: "volatile" markers on some parameters are to avoid trouble with
+ * PG_TRY inside the function.
*/
static void
ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn,
@@ -2762,7 +2765,6 @@ ReorderBufferChangeMemoryUpdate(ReorderBuffer *rb,
}
Assert(txn->size <= rb->size);
- Assert((txn->size >= 0) && (rb->size >= 0));
}
/*