Re: "ERROR: could not open relation with OID 16391" error was encountered when reindexing

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: feichanghong <feichanghong(at)qq(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: "ERROR: could not open relation with OID 16391" error was encountered when reindexing
Date: 2024-01-17 06:44:30
Message-ID: Zad3TgoaRBepIz2F@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 17, 2024 at 12:54:26AM +0800, feichanghong wrote:
>> This is extremely nonspecific, as line numbers in our code change
>> constantly. Please quote a chunk of code surrounding that
>> and indicate which line you are trying to stop at.
>
> Thanks for the suggestion, I've refined the steps below to reproduce:

Yeah, thanks for the steps. I am not surprised that there are still a
few holes in this area. CONCURRENTLY can behave differently depending
on the step where the old index is getting opened.

For this specific job, I have always wanted a try_index_open() that
would attempt to open the index with a relkind check, perhaps we could
introduce one and reuse it here?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-01-17 07:15:11 Re: Change GUC hashtable to use simplehash?
Previous Message Michael Paquier 2024-01-17 06:26:59 Re: Fix a possible socket leak at Windows (src/backend/port/win32/socket.c)