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.
This commit is contained in:
parent
d5176fa1e3
commit
05c7426bac
@ -1474,6 +1474,8 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
|
|||||||
* use as a normal record. It'll be cleaned up at the end
|
* use as a normal record. It'll be cleaned up at the end
|
||||||
* of INSERT processing.
|
* of INSERT processing.
|
||||||
*/
|
*/
|
||||||
|
if (specinsert == NULL)
|
||||||
|
elog(ERROR, "invalid ordering of speculative insertion changes");
|
||||||
Assert(specinsert->data.tp.oldtuple == NULL);
|
Assert(specinsert->data.tp.oldtuple == NULL);
|
||||||
change = specinsert;
|
change = specinsert;
|
||||||
change->action = REORDER_BUFFER_CHANGE_INSERT;
|
change->action = REORDER_BUFFER_CHANGE_INSERT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user