1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Minor code rationalization: FlushRelationBuffers just returns void,

rather than an error code, and does elog(ERROR) not elog(WARNING)
when it detects a problem.  All callers were simply elog(ERROR)'ing on
failure return anyway, and I find it hard to envision a caller that would
not, so we may as well simplify the callers and produce the more useful
error message directly.
This commit is contained in:
Tom Lane
2004-05-31 19:24:05 +00:00
parent a843053e2e
commit e674707968
8 changed files with 24 additions and 64 deletions

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.115 2004/05/08 19:09:24 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.116 2004/05/31 19:24:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -784,8 +784,6 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
}
if (new_pages != num_pages)
{
int i;
/*
* Okay to truncate.
*
@ -795,9 +793,7 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
* blocks we aren't deleting, but it's the closest thing in
* bufmgr's API.
*/
i = FlushRelationBuffers(rel, new_pages);
if (i < 0)
elog(ERROR, "FlushRelationBuffers returned %d", i);
FlushRelationBuffers(rel, new_pages);
/*
* Do the physical truncation.