From: Sbob <sbob@quadratum-braccas.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: pg_total_relation_size shows 0 byt table has thousands of rows
Date: Thu, 11 Apr 2024 13:22:12 -0600
Message-ID: <f6900fcb-9b9c-4d35-8dee-3bccb5d5e64d@quadratum-braccas.com> (raw)
In-Reply-To: <CAKFQuwZ47g5Dg79kB9fF-Z6P-0R5kOtf81u_GiKD7wtVRX6GfA@mail.gmail.com>
References: <a13530b7-2bf6-4eb4-8cb5-395ce485b006@quadratum-braccas.com>
<CAKFQuwZ47g5Dg79kB9fF-Z6P-0R5kOtf81u_GiKD7wtVRX6GfA@mail.gmail.com>
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@quadratum-braccas.com> 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.
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: sbob@quadratum-braccas.com, david.g.johnston@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_total_relation_size shows 0 byt table has thousands of rows
In-Reply-To: <f6900fcb-9b9c-4d35-8dee-3bccb5d5e64d@quadratum-braccas.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox