Re: pg_total_relation_size() could not open relation with OID X
- From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
- To: Michael Fuhr <mike(at)fuhr(dot)org>
- Cc: pgsql-hackers(at)postgresql(dot)org
- Subject: Re: pg_total_relation_size() could not open relation with OID X
- Date: Thu, 29 Sep 2005 10:19:14 -0400
- Message-id: <20050929141914(dot)GC5272(at)surnet(dot)cl>
On Wed, Sep 28, 2005 at 10:25:16PM -0600, Michael Fuhr wrote:
> test=> TRUNCATE foo;
> TRUNCATE TABLE
> test=> SELECT oid, relfilenode FROM pg_class WHERE relname = 'foo';
> oid | relfilenode
> -------+-------------
> 26235 | 26237
> (1 row)
The code is obviously confused between Oid and relfilenode. The
calculate_total_relation_size() function gets a relfilenode parameter
and then tries to call relation_open() with it. This is wrong.
I'll submit/commit a patch fixing this, later today. Thanks for the
test case.
--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 17.7", W 73º 14' 26.8"
"Granting software the freedom to evolve guarantees only different results,
not better ones." (Zygo Blaxell)
Home |
Main Index |
Thread Index