Re: Can't find a relation in pg_class

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can't find a relation in pg_class
Date: 2018-11-15 20:28:04
Message-ID: 20181115202804.kup5jpbkx6tf7zxe@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 2018-Nov-15, Ron wrote:

> On 11/15/2018 02:02 PM, Alvaro Herrera wrote:
> > On 2018-Nov-15, Ron wrote:
> >
> > > On 11/15/2018 12:56 PM, Tom Lane wrote:
> > > > Ron <ronljohnsonjr(at)gmail(dot)com> writes:
> > > > > 10.143.169.100(38184) TAP TAPb 14310 PARSE waiting [unknown] 00000
> > > > >        LOG:  process 14310 still waiting for AccessShareLock
> > > > >        on relation *767445914* of database *767442254* after 1000.389 ms at
> > > > > character 39
> > > > > We found this in the log file, so went looking for what relation 767445914
> > > > > is, but don't see it in the pg_class table.  Am I doing something wrong?
> > > > This message would be citing relation OID not relfilenode, I believe.
> > > In what table?
> > select ... from pg_class where oid = 767445914
>
> That's what I thought.  But select oid, relfilenode from pg_class shows that
> c.oid always has the same value as c.relfilenode.

Then the other cases Tom mentioned apply.

(Note that that equality doesn't apply in general. The relfilenode will
change on VACUUM FULL, or CLUSTER, or table-rewriting ALTER TABLE,
whereas the OID will always stay unchanged.)

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sergei Kornilov 2018-11-15 20:28:40 Re: checkpoint occurs very often when vacuum full running
Previous Message Ron 2018-11-15 20:09:55 Re: Can't find a relation in pg_class