Re: pg_total_relation_size shows 0 byt table has thousands of rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is on PG version 14


sales_info=# select count(*) from sales_info.reject_errors;
 count  
--------
 688422
(1 row)

sales_info=# select pg_total_relation_size ('sales_info.reject_errors');
 pg_total_relation_size
------------------------
                      0
(1 row)

sales_info=# analyze sales_info.reject_errors;
ANALYZE
sales_info=# vacuum sales_info.reject_errors;
VACUUM
sales_info=# select pg_total_relation_size ('sales_info.reject_errors');
 pg_total_relation_size
------------------------
                      0
(1 row)

sales_info=# select pg_total_relation_size ('sales_info.reject_errors'::regclass);
 pg_total_relation_size
------------------------
                      0
(1 row)

sales_info=# select oid from pg_class where relname = 'reject_errors';
  oid  
-------
 39379
(1 row)

sales_info=# select pg_total_relation_size (39379);
 pg_total_relation_size
------------------------
                      0
(1 row)




On 4/11/24 12:30, David G. Johnston wrote:
On Thu, Apr 11, 2024 at 11:11 AM Sbob <sbob@xxxxxxxxxxxxxxxxxxxxx> wrote:

I have a table that has 39,000 rows in it, but a
pg_total_relation_size('schema.table') shows a size of 0

I did a vacuum and an analyze but no change

Thoughts?


Copy and paste the exact queries you are running and the results they are giving.

David J.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux