From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Konireddy Rajashekar <rajkonireddy(at)gmail(dot)com> |
Cc: | bhargav kamineni <bhargavpostgres(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: OID out of range |
Date: | 2020-01-15 19:20:07 |
Message-ID: | CAKFQuwbuH3B0ui3QQde4m=n0jzOhwfQPkACuj_AxMXqWmig0UQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Please don't top-post here.
On Wed, Jan 15, 2020 at 12:01 PM Konireddy Rajashekar <
rajkonireddy(at)gmail(dot)com> wrote:
> tried casting to text,varchar but no luck
> select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as
> current_time,pg_size_pretty(pg_relation_size(c.oid)) as
> current_size,pg_size_pretty(u.table_size) as
> previous_size,pg_size_pretty(pg_relation_size(c.oid) -
> pg_relation_size(u.table_size)) as diff from user_tables_sizes u join
> pg_class c on u.relid::varchar= c.oid::varchar where c.relkind='r' and
> c.relnamespace::regnamespace::text='rpx_reporting_stage' and
> u.captured_dt::date=current_date - interval '1 days'
> ;
>
>
> ERROR: OID out of range
>
>>
>>
Yeah, the join isn't the problem, the error is casting to OID, not from...
Pretty sure your problem is:
pg_relation_size(u.table_size)
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2020-01-15 19:23:28 | Re: OID out of range |
Previous Message | Konireddy Rajashekar | 2020-01-15 19:17:23 | Re: OID out of range |