Function pg_indexes_size(oid) does not exist
8.4 is a pretty ancient version now.  The function you are after is not mentioned in the docs, therefore it is sane to think it simply did not exist back then.  9.0 introduced a number of administration functions, and pg_indexes_size() is one of those.

In any case, it would be prudent to upgrade to a supported version (9.2+ at the time of writing.