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

Commit050098b

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 parentf2f0082 commit050098b

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
@@ -1059,13 +1059,11 @@ DefineIndex(Oid relationId,
10591059

10601060
memcpy(part_oids,partdesc->oids,sizeof(Oid)*nparts);
10611061

1062-
parentDesc=CreateTupleDescCopy(RelationGetDescr(rel));
1062+
parentDesc=RelationGetDescr(rel);
10631063
opfamOids=palloc(sizeof(Oid)*numberOfKeyAttributes);
10641064
for (i=0;i<numberOfKeyAttributes;i++)
10651065
opfamOids[i]=get_opclass_family(classObjectId[i]);
10661066

1067-
table_close(rel,NoLock);
1068-
10691067
/*
10701068
* For each partition, scan all existing indexes; if one matches
10711069
* our index definition and is not already attached to some other
@@ -1265,13 +1263,12 @@ DefineIndex(Oid relationId,
12651263
heap_freetuple(newtup);
12661264
}
12671265
}
1268-
else
1269-
table_close(rel,NoLock);
12701266

12711267
/*
12721268
* Indexes on partitioned tables are not themselves built, so we're
12731269
* done here.
12741270
*/
1271+
table_close(rel,NoLock);
12751272
if (!OidIsValid(parentIndexId))
12761273
pgstat_progress_end_command();
12771274
returnaddress;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp