Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite4f2d4f

Browse files
committed
Fix use-after-free introduced in55ed3de
Evidenced by failure under RELCACHE_FORCE_RELEASE (buildfarm memberprion).Author: Amit LangoteDiscussion:https://postgr.es/m/CA+HiwqGV=k_Eh4jBiQw66ivvdG+EUkrEYeHTYL1SvDj_YOYV0g@mail.gmail.com
1 parent9653ca2 commite4f2d4f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎src/backend/commands/indexcmds.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -896,13 +896,11 @@ DefineIndex(Oid relationId,
896896

897897
memcpy(part_oids,partdesc->oids,sizeof(Oid)*nparts);
898898

899-
parentDesc=CreateTupleDescCopy(RelationGetDescr(rel));
899+
parentDesc=RelationGetDescr(rel);
900900
opfamOids=palloc(sizeof(Oid)*numberOfKeyAttributes);
901901
for (i=0;i<numberOfKeyAttributes;i++)
902902
opfamOids[i]=get_opclass_family(classObjectId[i]);
903903

904-
heap_close(rel,NoLock);
905-
906904
/*
907905
* For each partition, scan all existing indexes; if one matches
908906
* our index definition and is not already attached to some other
@@ -1100,13 +1098,12 @@ DefineIndex(Oid relationId,
11001098
heap_freetuple(newtup);
11011099
}
11021100
}
1103-
else
1104-
heap_close(rel,NoLock);
11051101

11061102
/*
11071103
* Indexes on partitioned tables are not themselves built, so we're
11081104
* done here.
11091105
*/
1106+
heap_close(rel,NoLock);
11101107
returnaddress;
11111108
}
11121109

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp