pg_total_relation_size() could not open relation with OID X
- From: Michael Fuhr <mike(at)fuhr(dot)org>
- To: pgsql-hackers(at)postgresql(dot)org
- Subject: pg_total_relation_size() could not open relation with OID X
- Date: Wed, 28 Sep 2005 22:25:16 -0600
- Message-id: <20050929042516(dot)GA29525(at)winnie(dot)fuhr(dot)org>
Here's a test case for a pg_total_relation_size() failure:
test=> CREATE TABLE foo (id integer);
CREATE TABLE
test=> SELECT oid, relfilenode FROM pg_class WHERE relname = 'foo';
oid | relfilenode
-------+-------------
26235 | 26235
(1 row)
test=> SELECT pg_total_relation_size('foo');
pg_total_relation_size
------------------------
0
(1 row)
test=> TRUNCATE foo;
TRUNCATE TABLE
test=> SELECT oid, relfilenode FROM pg_class WHERE relname = 'foo';
oid | relfilenode
-------+-------------
26235 | 26237
(1 row)
test=> SELECT pg_total_relation_size('foo');
ERROR: could not open relation with OID 26237
test=> SELECT pg_total_relation_size(26235);
ERROR: could not open relation with OID 26237
test=> SELECT pg_relation_size('foo');
pg_relation_size
------------------
0
(1 row)
--
Michael Fuhr
Home |
Main Index |
Thread Index