mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
There is no need for ReadBuffer() call sites to check that the returned
buffer is valid, as ReadBuffer() will elog on error. Most of the call sites of ReadBuffer() got this right, but this patch fixes those call sites that did not.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.78 2004/10/26 16:05:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.79 2004/11/14 02:04:13 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -811,8 +811,6 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
|
||||
* tuples.
|
||||
*/
|
||||
targbuffer = ReadBuffer(onerel, targblock);
|
||||
if (!BufferIsValid(targbuffer))
|
||||
elog(ERROR, "ReadBuffer failed");
|
||||
LockBuffer(targbuffer, BUFFER_LOCK_SHARE);
|
||||
targpage = BufferGetPage(targbuffer);
|
||||
maxoffset = PageGetMaxOffsetNumber(targpage);
|
||||
|
Reference in New Issue
Block a user