I wrote:
> 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.
This is the patch I'm about to apply. Besides fixing this particular
problem, I made the code include the size of the index of the TOAST
table in pg_total_relation_size().
--
Alvaro Herrera Architect, http://www.EnterpriseDB.com
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)