The following bug has been logged on the website:
Bug reference: 13830
Logged by: T_T
Email address: foggyglass@163.com
PostgreSQL version: 9.5rc1
Operating system: centos7
Description:
Hi friend,
I think there is a error about pg_table_size and pg_indexes_size in
PostgreSQL .
This is my operation log
[postgres@c7 bin]$./psql
psql (9.5beta2)
Type "help" for help.
postgres=# create table b(id int);
CREATE TABLE
postgres=# create index b_idx on b(id);
CREATE INDEX
postgres=# select relname , pg_table_size(oid),pg_indexes_size(oid)
postgres-# from pg_class where relname in ('b','b_idx');
relname | pg_table_size | pg_indexes_size
---------+---------------+-----------------
b | 0 | 8192
b_idx | 8192 | 0
(2 rows)
postgres=#
The b_idex is a index , but pg_indexes_size does not show its size . The b
is a table , but pg_table_size does not show its size .I think the
pg_table_size show the b size , but not pg_indexes_size .