Subject: [PATCHES] More psql and libpq patches
Well..these would be the last patches until the release (I hope)...
I ran the regression tests while watching psql under purify, and it did
not leak even one byte.
In this patch:
* Plugged a major leak when PSQL reads files for input (either through
\i options or through -f option)
* Fixed the one remaining leak in PSQL in not clearing PGresult *results
everywhere it is supposed to. (Thanks Tymm)
* Fixed A small leak in PSQL not clearing all the PGsettings correctly.
* A not-so-obvious (but small) leak in Libpq when PQsetdb fails for any
reason.
* Added \n to some Libpq error messages to make them easier to digest..
* Finally, added /* PURIFY */ comment to some of the code indicating
the reason for why it was added/changed...for future developers.
Subject: [HACKERS] src.original/./backend/lib/fstack.c
Another change I suggested. I bracket an unused function and add a
return to quiet the compiler. In addition I added an internal
consistency check.
Subject: [HACKERS] backend/optimizer/geqo/geqo_erx.c
I sent these changes in with a bunch of others. Some were folded in but
others, like these, were not. I am not sure why so I am resending this
to the developers list by itself for discussion.
The readon why I suggest these changes is that the compiler can't tell
that minimum_count is initialized before it is used. The tests that I
add in here will cause an immediate error if it doesn't. As the comments
below suggest, if it is 100% guaranteed that the variable will always
be initialized then how this is so should be commented here. I don't
know how much strain the actual test puts on the performance but if it
isn't too much then maybe leave it in for absolute safety anyway.
There are also a few returns just to stop warnings.
for join-relations. Sizes already computed by
prune_rel_paths():compute_joinrel_size().
joinrels.c:
< if ( _use_right_sided_plans_ )
---
> if ( _use_right_sided_plans_ &&
> length (outer_rel->relids) > 1 )
- r_plans are useful when outer_rel is join-relation... It
decreases the size of search space...
psql.c: In function `HandleSlashCmds':
psql.c:1141: warning: `optarg3' might be used uninitialized in this function
psql.c:1157: warning: `optarg3' might be used uninitialized in this function
-> char *optarg3 = NULL;
start time equal to tuple->t_tmax.
Privent shrinking if there are tuples modifyed by running transactions
(it concerns system relations only, currently).
Subject: [PATCHES] patch for a memory leak
Well...I screwed up and posted the wrong patch for psql originally..
The patch for that patch wposted below will fix it..