Re: [PATCH v1] Fix propagation of indimmediate flag in index_create_copy - Mailing list pgsql-hackers

From Nitin Motiani
Subject Re: [PATCH v1] Fix propagation of indimmediate flag in index_create_copy
Date
Msg-id CAH5HC96VvCe+EDyOiC8FdBEfd+P1_EPwg2UGF55xhW6bgpUTAA@mail.gmail.com
Whole thread
List pgsql-hackers
On Mon, Jul 20, 2026 at 11:47 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
>
> Hah, that was quick, thanks!  This fails the isolation tests for me
> though, with this backtrace:
>

I drafted the change a couple of weeks ago but had not sent it out as
I was trying to see if I missed something. When I saw your response on
the thread, I sent it out as is.


> #4  0x00005618d76672d6 in ExceptionalCondition (
>     conditionName=conditionName@entry=0x5618d77741a8 "(constr_flags == 0) || ((flags & INDEX_CREATE_ADD_CONSTRAINT)
!=0)", 
>     fileName=fileName@entry=0x5618d7773e58 "../../pgsql/source/master/src/backend/catalog/index.c",
lineNumber=lineNumber@entry=773)
>     at ../../pgsql/source/master/src/backend/utils/error/assert.c:65
> #5  0x00005618d7271fd5 in index_create (heapRelation=heapRelation@entry=0x7f13e9ce85d0,
>     indexRelationName=indexRelationName@entry=0x5618fe816e58 "uq_val_ccnew", indexRelationId=indexRelationId@entry=0,
>     parentIndexRelid=parentIndexRelid@entry=0, parentConstraintId=parentConstraintId@entry=0,
relFileNumber=relFileNumber@entry=0,
>     indexInfo=0x5618fe816aa8, indexColNames=0x5618fe6c8d40, accessMethodId=403, tableSpaceId=0,
collationIds=0x5618fe73e2f8,
>     opclassIds=0x7f13e9cead80, opclassOptions=0x5618fe6c8ea0, coloptions=0x7f13e9cead9c, stattargets=0x5618fe80d748,
reloptions=0,flags=140, 
>     constr_flags=2, allow_system_table_mods=true, is_internal=false, constraintId=0x0) at
../../pgsql/source/master/src/backend/catalog/index.c:773
> #6  0x00005618d727248d in index_create_copy (heapRelation=heapRelation@entry=0x7f13e9ce85d0, flags=flags@entry=140,
oldIndexId=33725,
>     tablespaceOid=0, newName=0x5618fe816e58 "uq_val_ccnew") at
../../pgsql/source/master/src/backend/catalog/index.c:1468
> #7  0x00005618d72cbd46 in ReindexRelationConcurrently (stmt=stmt@entry=0x5618fe712228,
relationOid=relationOid@entry=33722,
>     params=params@entry=0x7ffcf8ab62f8) at ../../pgsql/source/master/src/backend/commands/indexcmds.c:4117
> #8  0x00005618d72cd892 in ReindexTable (stmt=0x5618fe712228, params=0x7ffcf8ab62f8, isTopLevel=true)
>     at ../../pgsql/source/master/src/backend/commands/indexcmds.c:3227
> #9  ExecReindex (pstate=pstate@entry=0x5618fe6c8c30, stmt=stmt@entry=0x5618fe712228,
isTopLevel=isTopLevel@entry=true)
>     at ../../pgsql/source/master/src/backend/commands/indexcmds.c:3042
>
>
> This is during the
>   REINDEX TABLE CONCURRENTLY reind_deferred;
> execution.
>

Thanks. I will look into this.

Regards,
Nitin Motiani
Google



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Batching in executor
Next
From: Rafia Sabih
Date:
Subject: Re: Bypassing cursors in postgres_fdw to enable parallel plans