summaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-31 19:24:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-31 19:24:05 +0000
commite674707968059459960304981fc0a1d7a6049e24 (patch)
treef276eafb51fa96700fd49a3e7bb309516fbec280 /src/backend/commands/cluster.c
parenta843053e2e596da640d2afc73eeaa1f9273fff38 (diff)
downloadpostgresql-e674707968059459960304981fc0a1d7a6049e24.tar.gz
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.
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index d9c4397176..0483eaf2d3 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.124 2004/05/26 04:41:10 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.125 2004/05/31 19:24:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -660,7 +660,6 @@ swap_relfilenodes(Oid r1, Oid r2)
Form_pg_class relform1,
relform2;
Oid swaptemp;
- int i;
CatalogIndexState indstate;
/* We need writable copies of both pg_class tuples. */
@@ -687,15 +686,11 @@ swap_relfilenodes(Oid r1, Oid r2)
* forget about'em. (XXX this might not be necessary anymore?)
*/
rel = relation_open(r1, NoLock);
- i = FlushRelationBuffers(rel, 0);
- if (i < 0)
- elog(ERROR, "FlushRelationBuffers returned %d", i);
+ FlushRelationBuffers(rel, 0);
relation_close(rel, NoLock);
rel = relation_open(r2, NoLock);
- i = FlushRelationBuffers(rel, 0);
- if (i < 0)
- elog(ERROR, "FlushRelationBuffers returned %d", i);
+ FlushRelationBuffers(rel, 0);
relation_close(rel, NoLock);
/*