Fix use-after-free bug when renaming constraints

Michael Paquier <michael@paquier.xyz>

Commit: c7567e09d5d1e6357b95ad16f2bc4dd6affa07f3
Author: Michael Paquier <michael@paquier.xyz>
Date: 2018-12-17T03:44:02Z
Releases: 9.5.16
Fix use-after-free bug when renaming constraints

This is an oversight from recent commit b13fd344.  While on it, tweak
the previous test with a better name for the renamed primary key.

Detected by buildfarm member prion which forces relation cache release
with -DRELCACHE_FORCE_RELEASE.  Back-patch down to 9.4 as the previous
commit.

Files