Re: pg_total_relation_size() could not open relation with OID X

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_total_relation_size() could not open relation with OID X
Дата
Msg-id 20050929141914.GC5272@surnet.cl
обсуждение исходный текст
Ответ на pg_total_relation_size() could not open relation with OID X  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: pg_total_relation_size() could not open relation with OID X  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
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)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: postgresql clustering
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Proposed patch for sequence-renaming problems