Skip to content

Commit 3ca966c

Browse files
committed
logical decoding: beware of an unset specinsert change
Coverity complains that there is no protection in the code (at least in non-assertion-enabled builds) against speculative insertion failing to follow the expected protocol. Add an elog(ERROR) for the case.
1 parent 0c06534 commit 3ca966c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,8 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
14741474
* use as a normal record. It'll be cleaned up at the end
14751475
* of INSERT processing.
14761476
*/
1477+
if (specinsert == NULL)
1478+
elog(ERROR, "invalid ordering of speculative insertion changes");
14771479
Assert(specinsert->data.tp.oldtuple == NULL);
14781480
change = specinsert;
14791481
change->action = REORDER_BUFFER_CHANGE_INSERT;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy