From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] psql and large objects fix
Psql was broken by using "Inv[0-9]+" instead of "xin[xv][0-9]+" to not
show large object files. Been this way for a long time too. Relic of
an older naming convention, perhaps?
From: Igor <igor@sba.miami.edu>
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.
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.
allpaths.c:find_join_paths(): compute_rel_size() shouldn't be called
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...
New func RelationForgetRelation();
* RelationFlushRelation + if the relation is local then get rid of
* the relation descriptor from the newly created relation list.
Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow
migration from pre-v6.1 geometric data types.
Only allow new input syntax for paths and polygons.
cc1: warnings being treated as errors
dt.c: In function `timespan2tm':
dt.c:1722: warning: unused variable `funit'
dt.c:1722: warning: unused variable `iunit'
cc1: warnings being treated as errors
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
From: David Friend <dfriend@atlsci.atlsci.com>
Subject: [PATCHES] INSTALL patch
This patch makes the following changes to the INSTALL instructions:
- Before step 1, describe disk space requirements.
- Step 1 now defines a "tested" platform.
- Add step 3a on checking for disk space.
- Added new step 27 asking for feedback.
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] Another destroydb patch
This is a patch to my previous destroydb patch cause some people wanted
slightly different behavior. After this patch is applied, destroydb
will destroy a database as usual, but if added -i flag (which could be
aliased like rm -i) would ask for confirmation.
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] pg_dump memory leak patch
This patch fixes a HUGE memory leak problem in pg_dump.
Pretty much anything that was allocated was never freed and Purify
reported about 40% possible memory leak and 6% actual leak. I added
functions to clear out all the allocated structures. After the patch
Purify returns 0 for number of bytes leaked...
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] destroydb patch
I am including a patch for destroydb to ask for confirmation before
deleting databases (after I accidentally deleted mine)...destroydb -y
would force delete without any confirmation.
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] memory leak patches in libpq and psql
A couple of small memory leak patches (detected with Purify) primarily
in libpq.
* Fixed (NULL) border problem in psql (run psql, do \m, then select
something from a table...row separators will be nulls)
* Fixed memory leak with the abovementioned border not being freed
properly.
* Fixed memory leak in freePGconn() not freeing conn->port
* Fixed up PQclear() to free parts of PGresult only if these
parts are not null.
* Fixed a decent memory leak that occured after executing every command
in psql. PGresult *results was not freed most of the time.
There is still a leak being detected (2 bytes) in readline functions, but
I think this is old readline library. I will install new one and test it.
Marc G. Fournier [Mon, 26 May 1997 00:43:41 +0000 (00:43 +0000)]
From: David Friend <dfriend@atlsci.atlsci.com>
Subject: [PATCHES] INSTALL changes
This patch modifies the INSTALL file. The changes are:
- SPARC/Linux-ELF was added to the list of supported platforms.
The special notes for it at the bottom of the file were removed.
- Changed "database server" to "RDBMS database server".
- Modified step 6 so that when you restore your database the
tables will be owned by the original owners instead of the
postgresql superuser.
- Modified step 19 on diagnosing the regression tests for the
SPARC Linux platform with a beta release.
- Other minor changes.