1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +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

@@ -31,7 +31,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.40 2004/05/08 19:09:25 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.41 2004/05/31 19:24:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -731,9 +731,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
* will also write out dirty buffers for blocks we aren't deleting,
* but it's the closest thing in bufmgr's API.
*/
i = FlushRelationBuffers(onerel, new_rel_pages);
if (i < 0)
elog(ERROR, "FlushRelationBuffers returned %d", i);
FlushRelationBuffers(onerel, new_rel_pages);
/*
* Do the physical truncation.