postgresql/src/backend/utils
Tom Lane 73eba19aeb Fix another ancient memory-leak bug in relcache.c.
CheckConstraintFetch() leaked a cstring in the caller's context for each
CHECK constraint expression it copied into the relcache.  Ordinarily that
isn't problematic, but it can be during CLOBBER_CACHE testing because so
many reloads can happen during a single query; so complicate the code
slightly to allow freeing the cstring after use.  Per testing on buildfarm
member barnacle.

This is exactly like the leak fixed in AttrDefaultFetch() by commit
078b2ed291.  (Yes, this time I did look for
other instances of the same coding pattern :-(.)  Like that patch, no
back-patch, since it seems unlikely that there's any problem except under
very artificial test conditions.

BTW, it strikes me that both of these places would require further work
comparable to commit ab8c84db2f, if we ever
supported defaults or check constraints on system catalogs: they both
assume they are copying into an empty relcache data structure, and that
conceivably wouldn't be the case during recursive reloading of a system
catalog.  This does not seem worth worrying about for the moment, since
there is no near-term prospect of supporting any such thing.  So I'll
just note the possibility for the archives' sake.
2014-08-24 11:56:52 -04:00
..
adt Fix corner-case behaviors in JSON/JSONB field extraction operators. 2014-08-22 13:17:58 -04:00
cache Fix another ancient memory-leak bug in relcache.c. 2014-08-24 11:56:52 -04:00
error Add option to pg_ctl to choose event source for logging 2014-07-17 12:42:08 +02:00
fmgr
hash
init Break out OpenSSL-specific code to separate files. 2014-08-11 11:54:19 +03:00
mb Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
misc Use comma+space as the separator in the default search_path. 2014-08-20 12:06:08 +03:00
mmgr
resowner pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sort Don't require sort support functions to provide a comparator. 2014-08-06 16:06:06 -04:00
time Avoid uselessly looking up old LOCK_ONLY multixacts 2014-07-29 15:41:06 -04:00
.gitignore
errcodes.txt
Gen_dummy_probes.sed
Gen_fmgrtab.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
generate-errcodes.pl
Makefile
probes.d