Fix use-after-release issue with pg_identify_object_as_address()
Spotted by buildfarm member prion, with -DRELCACHE_FORCE_RELEASE. Introduced in f7aab36. Discussion: https://postgr.es/m/2759018.1619577848@sss.pgh.pa.us Backpatch-through: 9.6
This commit is contained in:
parent
f3c4537876
commit
a928297bc6
@ -5092,7 +5092,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
|||||||
elog(ERROR, "cache lookup failed for event trigger %u",
|
elog(ERROR, "cache lookup failed for event trigger %u",
|
||||||
object->objectId);
|
object->objectId);
|
||||||
trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
|
trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
|
||||||
evtname = NameStr(trigForm->evtname);
|
evtname = pstrdup(NameStr(trigForm->evtname));
|
||||||
appendStringInfoString(&buffer, quote_identifier(evtname));
|
appendStringInfoString(&buffer, quote_identifier(evtname));
|
||||||
if (objname)
|
if (objname)
|
||||||
*objname = list_make1(evtname);
|
*objname = list_make1(evtname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user