Skip to content

Commit eabb225

Browse files
committed
Remove over-eager assertion in ExtendBufferedRelTo()
The assertion checked that the size of the relation is not "too large" - but the code is explicitly dealing with the possibility of another backend extending the relation concurrently. In that case the new relation size could be bigger than what the current backend needs, wrongly triggering an assertion failure. Unfortunately it is hard to write a reliable and affordable regression tests for this, as a lot of concurrency is needed to encounter the bug. Introduced in 31966b1. Reported-by: Melanie Plageman <melanieplageman@gmail.com>
1 parent bc971f4 commit eabb225

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/backend/storage/buffer/bufmgr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ ExtendBufferedRelTo(ExtendBufferedWhat eb,
953953
buffers, &extended_by);
954954

955955
current_size = first_block + extended_by;
956-
Assert(current_size <= extend_to);
957956
Assert(num_pages != 0 || current_size >= extend_to);
958957

959958
for (int i = 0; i < extended_by; i++)

0 commit comments

Comments
 (0)