mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove misleading read stream asserts in a few users
Several read stream users asserted that the read stream was exhausted after looping on that very condition. It was pointed out in an a review of an as-of-yet uncommitted read stream user [1] that this was confusing and could lead the reader to think there was a possibility of some kind of race condition. Remove these asserts. [1] https://postgr.es/m/F9ACE8D0-B807-4A17-B6BD-87EF0717983D%40yesql.se
This commit is contained in:
@ -853,8 +853,6 @@ verify_heapam(PG_FUNCTION_ARGS)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Ensure that the stream is completely read */
|
||||
Assert(read_stream_next_buffer(stream, NULL) == InvalidBuffer);
|
||||
read_stream_end(stream);
|
||||
|
||||
if (vmbuffer != InvalidBuffer)
|
||||
|
@ -254,8 +254,6 @@ gistvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
||||
gistvacuumpage(&vstate, buf);
|
||||
}
|
||||
|
||||
Assert(read_stream_next_buffer(stream, NULL) == InvalidBuffer);
|
||||
|
||||
/*
|
||||
* We have to reset the read stream to use it again. After returning
|
||||
* InvalidBuffer, the read stream API won't invoke our callback again
|
||||
|
@ -1117,8 +1117,6 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
||||
current_block);
|
||||
}
|
||||
|
||||
Assert(read_stream_next_buffer(stream, NULL) == InvalidBuffer);
|
||||
|
||||
/*
|
||||
* We have to reset the read stream to use it again. After returning
|
||||
* InvalidBuffer, the read stream API won't invoke our callback again
|
||||
|
@ -879,8 +879,6 @@ spgvacuumscan(spgBulkDeleteState *bds)
|
||||
spgprocesspending(bds);
|
||||
}
|
||||
|
||||
Assert(read_stream_next_buffer(stream, NULL) == InvalidBuffer);
|
||||
|
||||
/*
|
||||
* We have to reset the read stream to use it again. After returning
|
||||
* InvalidBuffer, the read stream API won't invoke our callback again
|
||||
|
Reference in New Issue
Block a user