/* Caller should not call me on a temp relation */
Assert(!reln->rd_istemp);
+ /* nor when there are no tuples to freeze */
+ Assert(offcnt > 0);
xlrec.node = reln->rd_node;
xlrec.block = BufferGetBlockNumber(buffer);
* it is. When XLogInsert stores the whole buffer, the offsets array need
* not be stored too.
*/
- if (offcnt > 0)
- {
- rdata[1].data = (char *) offsets;
- rdata[1].len = offcnt * sizeof(OffsetNumber);
- }
- else
- {
- rdata[1].data = NULL;
- rdata[1].len = 0;
- }
+ rdata[1].data = (char *) offsets;
+ rdata[1].len = offcnt * sizeof(OffsetNumber);
rdata[1].buffer = buffer;
rdata[1].buffer_std = true;
rdata[1].next = NULL;