Re: Size functions inconsistent results

2022-02-25 Thread Fabrízio de Royes Mello
On Fri, Feb 25, 2022 at 12:10 PM Japin Li wrote: > > > I think, you forget the index size of toast table. > > with relations as ( > select schemaname, relname, relid > from pg_stat_user_tables > where relname = 'test_size' > ), > sizes as ( > select > schemaname, > r.relname, > >

Re: Size functions inconsistent results

2022-02-25 Thread Japin Li
On Fri, 25 Feb 2022 at 22:58, Fabrízio de Royes Mello wrote: > Hi all, > > While doing some work using our functions [1] for calculate relations size > I noticed an inconsistency between pg_total_relation_size and calculate > everything separately, have a look in this example: > > fabrizio=# cr