Re: ERROR: could not open relation with OID 49152

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: could not open relation with OID 49152
Date: 2008-07-22 00:23:19
Message-ID: 20080722002319.GL5842@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe escribió:
> OK, I'm getting the above error on one of my fairly new 8.3 production
> databases. It happens when I run a query to see the size of my
> tables.
>
> SELECT pg_relation_size(c.relfilenode), n.nspname AS schemaname,
> c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner,
> t.spcname AS tablespace, c.relhasindex AS hasindexes, c.relhasrules AS
> hasrules, c.reltriggers > 0 AS hastriggers
> FROM pg_class c
> LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
> LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
> WHERE n.nspname = 'public';
> ERROR: could not open relation with OID 49152

Try pg_relation_size(c.oid) instead.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-07-22 02:05:56 Re: ERROR: could not open relation with OID 49152
Previous Message Tom Lane 2008-07-22 00:07:27 Re: ERROR: could not open relation with OID 49152