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

2024-01-18 Thread Michael Paquier
On Wed, Jan 17, 2024 at 04:03:46PM +0800, feichanghong wrote: > It has been verified that the patch in the attachment can solve the > above problems. I sincerely look forward to your suggestions! Thanks for the patch. I have completely forgotten to update this thread. Except for a few comments

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

2024-01-17 Thread feichanghong
It has been verified that the patch in the attachment can solve the above problems. I sincerely look forward to your suggestions! v1-try_index_open.patch Description: Binary data

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

2024-01-16 Thread feichanghong
For this specific job, I have always wanted a try_index_open() thatwould attempt to open the index with a relkind check, perhaps we couldintroduce one and reuse it here?Yes, replacing index_open with try_index_open solves the problem. Theidea is similar to my initial report of "after successfully

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

2024-01-16 Thread Michael Paquier
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

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

2024-01-16 Thread feichanghong
> 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: 1. Initialize the data ``` DROP TABLE IF

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

2024-01-16 Thread Tom Lane
"=?ISO-8859-1?B?ZmVpY2hhbmdob25n?=" writes: > 2. session1 reindex and gdb break at index.c:3585 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.

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

2024-01-16 Thread feichanghong
I have provided a python script in the attachment to minimize the reproduction of the issue. I'm sorry that I lost the attached script in my last reply, but I've added it in this reply. You can also use psql to reproduce it with the following steps: 1. Initialize the data ``` DROP TABLE IF

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

2024-01-16 Thread feichanghong
Thank you for your attention.Any chance you could provide minimal steps to reproduce the issue onan empty PG instance, ideally as a script? That's going to be helpfulto reproduce / investigate the issue and also make sure that it'sfixed.I have provided a python script in the attachment to minimize

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

2024-01-16 Thread Aleksander Alekseev
Hi, > This issue has been reported in the list at the link below, but > has not received a reply. > https://www.postgresql.org/message-id/18286-f6273332500c2a62%40postgresql.org > Hopefully to get some response from kernel hackers, thanks! > > Hi, > When reindex the partitioned table's index

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

2024-01-16 Thread feichanghong
This issue has been reported in the list at the link below, but has not received a reply. https://www.postgresql.org/message-id/18286-f6273332500c2a62%40postgresql.org Hopefully to get some response from kernel hackers, thanks! Hi, When reindex the partitioned table's index and the drop index