| 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: | 2005-09-29 04:25:16 |
| Message-ID: | 20050929042516.GA29525@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeffrey W. Baker | 2005-09-29 04:27:20 | Re: [PERFORM] A Better External Sort? |
| Previous Message | Bruce Momjian | 2005-09-29 03:54:48 | Open items list |