Re: \d t: ERROR: XX000: cache lookup failed for relation

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: \d t: ERROR: XX000: cache lookup failed for relation
Date: 2018-06-04 17:34:10
Message-ID: 20180604173409.GD5164@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 04, 2018 at 08:01:41PM +0300, Teodor Sigaev wrote:
> >Also note that my "INSERT" was run in a separate loop, concurrent with the
> >VACUUM and ALTER, but yours is running consecutively.
>
> both loops run in backgound. I tried to run two scripts - and got a lot of
> deadlocks but not a probem reproduction.

Ah, I think this is the missing, essential component:
CREATE INDEX ON t(right(i::text,1)) WHERE i::text LIKE '%1';

I can reproduce it running just this loop:

time while :; do for a in `seq 999`; do psql postgres --port 5678 -c "ALTER TABLE t ALTER i TYPE int USING i::int"; done; done

Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-06-04 17:42:38 Re: Remove mention in docs that foreign keys on partitioned tables are not supported
Previous Message Justin Clift 2018-06-04 17:29:01 Re: Code of Conduct plan