aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-06-11 17:26:42 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-06-11 17:26:42 -0400
commite262755bfc97f31442cc0def8098b1a7d2913355 (patch)
tree29addcdbcce85c307d023acd168d8dfe1846a9fa /src/backend/utils/adt/json.c
parentecdec470e7a39316df185d387aeaeceab7155ada (diff)
downloadpostgresql-e262755bfc97f31442cc0def8098b1a7d2913355.tar.gz
postgresql-e262755bfc97f31442cc0def8098b1a7d2913355.zip
Fix cache flush hazard in cache_record_field_properties().
We need to increment the refcount on the composite type's cached tuple descriptor while we do lookups of its column types. Otherwise a cache flush could occur and release the tuple descriptor before we're done with it. This fails reliably with -DCLOBBER_CACHE_ALWAYS, but the odds of a failure in a production build seem rather low (since the pfree'd descriptor typically wouldn't get scribbled on immediately). That may explain the lack of any previous reports. Buildfarm issue noted by Christian Ullrich. Back-patch to 9.1 where the bogus code was added.
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions