BUG #13830: pg_table_size and pg_indexes_size - Mailing list pgsql-bugs

From foggyglass@163.com
Subject BUG #13830: pg_table_size and pg_indexes_size
Date
Msg-id 20151223145546.2688.94659@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13830: pg_table_size and pg_indexes_size  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #13830: pg_table_size and pg_indexes_size  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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 .

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #13741: vacuumdb does not accept valid password
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #13830: pg_table_size and pg_indexes_size