Fix use-after-free in ri_LoadConstraintInfo

Amit Langote <amitlan@postgresql.org>

Commit: 68a8601ee9ec7285b5a3839e17360c0a9d0e52a3
Author: Amit Langote <amitlan@postgresql.org>
Date: 2026-03-31T08:04:44Z
Fix use-after-free in ri_LoadConstraintInfo

conindid was read from conForm after ReleaseSysCache(tup).  Move
the read to before the release.

Introduced by commit 2da86c1ef9b5.

Per buildfarm member prion.

Discussion: https://postgr.es/m/CA+HiwqGGYjN6F2oL7yAk=hvSs-sj3TPqZ9JC9iyLkCqJadECrw@mail.gmail.com

Files

PathChange+/−
src/backend/utils/adt/ri_triggers.c modified +5 −4

Discussion

Cited messages not in the archive: CA+HiwqGGYjN6F2oL7yAk=hvSs-sj3TPqZ9JC9iyLkCqJadECrw@mail.gmail.com