Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1460b19

Browse files
committed
Assert that pre/post-fix updated tuples are on the same page during replay.
If they were not 'oldtup.t_data' would be dereferenced while set to NULL in case of a full page image for block 0. Do so primarily to silence coverity; but also to make sure this prerequisite isn't changed without adapting the replay routine as that would appear to work in many cases. Andres Freund
1 parent a692ee5 commit 1460b19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/heap/heapam.c

+2
Original file line numberDiff line numberDiff line change
@@ -8115,11 +8115,13 @@ newsame:;
81158115

81168116
if (xlrec->flags & XLOG_HEAP_PREFIX_FROM_OLD)
81178117
{
8118+
Assert(samepage);
81188119
memcpy(&prefixlen, recdata, sizeof(uint16));
81198120
recdata += sizeof(uint16);
81208121
}
81218122
if (xlrec->flags & XLOG_HEAP_SUFFIX_FROM_OLD)
81228123
{
8124+
Assert(samepage);
81238125
memcpy(&suffixlen, recdata, sizeof(uint16));
81248126
recdata += sizeof(uint16);
81258127
}

0 commit comments

Comments
 (0)