Re: Fwd: BUG #18016: REINDEX TABLE failure - Mailing list pgsql-bugs

From Nathan Bossart
Subject Re: Fwd: BUG #18016: REINDEX TABLE failure
Date
Msg-id 20230727231059.GA3612597@nathanxps13
Whole thread Raw
In response to Fwd: BUG #18016: REINDEX TABLE failure  (Gurjeet Singh <gurjeet@singh.im>)
List pgsql-bugs
On Wed, Jul 26, 2023 at 06:42:14PM -0700, Gurjeet Singh wrote:
> On Wed, Jul 26, 2023 at 10:50 AM Nathan Bossart
> <nathandbossart@gmail.com> wrote:
>> On Mon, Jul 10, 2023 at 09:35:05AM -0700, Gurjeet Singh wrote:
>> > The code block movement involved slightly more thought and care than I
>> > had previously imagined. As explained in comments in the patch, the
>> > enumeration and suppression of indexes on the main table must happen
>> > before any CommandCounterIncrement() call, hence the
>> > reindex-the-toast-table-if-any code had to be placed after that
>> > enumeration.
>>
>> Do we need to add another CCI after reindexing the TOAST table?  It looks
>> like we presently do so between reindexing each relation, including the
>> TOAST table.
> 
> Yes, we do need to do a CCI after reindex the relation's toast table.
> But note that it is done by the recursive call to reindex_relation(),
> right after it calls reindex_index().

*facepalm*

Ah, I see it now.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18040: PostgreSQL does not report its version correctly
Next
From: Nathan Bossart
Date:
Subject: Re: Fwd: BUG #18016: REINDEX TABLE failure