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

Commitce1c5b9

Browse files
committed
Fix use-after-release mistake in currtid() and currtid2() for views
This issue has been present since the introduction of this code as ofa3519a2 from 2002, and has been found by buildfarm member prion thatuses RELCACHE_FORCE_RELEASE via the tests introduced recently ine786be5.Discussion:https://postgr.es/m/20200601022055.GB4121@paquier.xyzBackpatch-through: 9.5
1 parente786be5 commitce1c5b9

File tree

1 file changed

+6
-1
lines changed
  • src/backend/utils/adt

1 file changed

+6
-1
lines changed

‎src/backend/utils/adt/tid.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,13 @@ currtid_for_view(Relation viewrel, ItemPointer tid)
338338
rte=rt_fetch(var->varno,query->rtable);
339339
if (rte)
340340
{
341+
Datumresult;
342+
343+
result=DirectFunctionCall2(currtid_byreloid,
344+
ObjectIdGetDatum(rte->relid),
345+
PointerGetDatum(tid));
341346
table_close(viewrel,AccessShareLock);
342-
returnDirectFunctionCall2(currtid_byreloid,ObjectIdGetDatum(rte->relid),PointerGetDatum(tid));
347+
returnresult;
343348
}
344349
}
345350
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp