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

Commit8bc7449

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 parentf4f4d64 commit8bc7449

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
@@ -309,8 +309,13 @@ currtid_for_view(Relation viewrel, ItemPointer tid)
309309
rte=rt_fetch(var->varno,query->rtable);
310310
if (rte)
311311
{
312+
Datumresult;
313+
314+
result=DirectFunctionCall2(currtid_byreloid,
315+
ObjectIdGetDatum(rte->relid),
316+
PointerGetDatum(tid));
312317
heap_close(viewrel,AccessShareLock);
313-
returnDirectFunctionCall2(currtid_byreloid,ObjectIdGetDatum(rte->relid),PointerGetDatum(tid));
318+
returnresult;
314319
}
315320
}
316321
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp