Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-12-06 Thread Michael Paquier
On Wed, Dec 06, 2023 at 05:40:44PM -0800, Andres Freund wrote: > This looks good to me! Cool. I've applied this one, then. -- Michael signature.asc Description: PGP signature

Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-12-06 Thread Andres Freund
Hi, This looks good to me! Greetings, Andres Freund

Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-12-06 Thread Michael Paquier
On Wed, Dec 06, 2023 at 04:33:33PM -0800, Noah Misch wrote: > On Wed, Dec 06, 2023 at 03:17:12PM +0900, Michael Paquier wrote: >>> The "cannot" part of the message is also inaccurate, and it's not clear to >>> me >>> why we have this specific restriction at all. REINDEX INDEX CONCURRENTLY >>>

Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-12-06 Thread Noah Misch
On Wed, Dec 06, 2023 at 03:17:12PM +0900, Michael Paquier wrote: > On Sat, Nov 18, 2023 at 04:32:36PM -0800, Noah Misch wrote: > > On Sat, Nov 18, 2023 at 03:09:58PM -0800, Andres Freund wrote: > >> Unfortunately, there is a case of such an sqlstate that's not at all > >> indicating > >>

Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-12-05 Thread Michael Paquier
On Sat, Nov 18, 2023 at 04:32:36PM -0800, Noah Misch wrote: > On Sat, Nov 18, 2023 at 03:09:58PM -0800, Andres Freund wrote: >> Unfortunately, there is a case of such an sqlstate that's not at all >> indicating >> corruption, namely REINDEX CONCURRENTLY when the index is invalid: >> >>

Re: reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-11-18 Thread Noah Misch
On Sat, Nov 18, 2023 at 03:09:58PM -0800, Andres Freund wrote: > We currently provide no way to learn about a postgres instance having > corruption than searching the logs for corruption events than matching by > sqlstate, for ERRCODE_DATA_CORRUPTED and ERRCODE_INDEX_CORRUPTED. > > Unfortunately,

reindexing an invalid index should not use ERRCODE_INDEX_CORRUPTED

2023-11-18 Thread Andres Freund
Hi, We currently provide no way to learn about a postgres instance having corruption than searching the logs for corruption events than matching by sqlstate, for ERRCODE_DATA_CORRUPTED and ERRCODE_INDEX_CORRUPTED. Unfortunately, there is a case of such an sqlstate that's not at all indicating