Re: ERROR: could not open relation with OID

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, "'pgsql-general(at)postgresql(dot)org' (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: could not open relation with OID
Date: 2015-04-22 20:25:42
Message-ID: 553803C6.1010803@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/22/2015 11:40 AM, Steve Crawford wrote:
> This morning we got the following error from a daily script that
> produces a simple largest-table report:
> ERROR: could not open relation with OID 597597503
>
> I reran the script and it completed without error.
>
> Our server is running 9.1.15 from PgDg Ubuntu repos and the query run by
> the script is:
>
> SELECT
> relname AS TABLE,
> lpad ( pg_size_pretty ( pg_relation_size ( oid ) ), 9 ) AS SIZE,
> ( 100 * pg_relation_size ( oid ) /
> ( SELECT
> sum ( pg_relation_size ( oid ) )
> FROM
> pg_class
> WHERE
> relkind = 'r' ) ) ::numeric ( 4, 1 ) AS percent
> FROM
> pg_class
> WHERE
> relkind = 'r'
> ORDER BY
> relpages DESC
> LIMIT 60;
>
> My research hasn't led to a definitive conclusion on how to trace this
> issue and how much I should be concerned about this error.
>
> If it is of importance, it appears that a temporary table and temporary
> index were being created within the same second that the query was run.
>
> Any advice?

WHERE
relkind = 'r'
AND
relpersistence != 't'

>
> Cheers,
> Steve
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2015-04-22 21:30:23 Re: LDAP Authentication
Previous Message Jeff Ferguson 2015-04-22 20:09:59 Streaming-SQL Database PipelineDB (Based on PostgreSQL 9.4) - Available in Beta