Vadim B. Mikheev [Tue, 25 May 1999 18:31:28 +0000 (18:31 +0000)]
Get rid of page-level locking in btree-s.
BT_READ/BT_WRITE are BUFFER_LOCK_SHARE/BUFFER_LOCK_EXCLUSIVE now.
Also get rid of #define BT_VERSION_1 - we use version 1 as default
for near two years now.
Vadim B. Mikheev [Tue, 25 May 1999 18:20:31 +0000 (18:20 +0000)]
Get rid of page-level locking in btree-s.
LockBuffer is used to acquire read/write access
to index pages. Pages are released before leaving
index internals.
Jan Wieck [Tue, 25 May 1999 13:16:10 +0000 (13:16 +0000)]
Bugfix - Range table entries that are unused after rewriting should
not be marked inFromCl any longer. Otherwise the planner gets confused
and joins over them where in fact it does not have to.
Adjust hasSubLinks now with a recursive lookup - could be wrong in
multi action rules because parse state isn't reset correctly and all
actions in the rule are marked hasSubLinks if one of them has.
Tom Lane [Sun, 23 May 1999 21:41:14 +0000 (21:41 +0000)]
Detect case of invalid use of GROUP BY when there are no
aggregate functions, as in
select a, b from foo group by a;
The ungrouped reference to b is not kosher, but formerly we neglected to
check this unless there was an aggregate function somewhere in the query.
Bruce Momjian [Sun, 23 May 1999 01:04:07 +0000 (01:04 +0000)]
Here it is. Remove or rename the current interfaces/libpq++ and untar
this file in interfaces/
It will all need to be checked in. I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers. The new
version for the library is 3.0.
Run configure from src/ to create the Makefile and it should be good to
go.
I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.
Tom Lane [Sat, 22 May 1999 23:19:37 +0000 (23:19 +0000)]
Modify aset.c logic so that blocks requested from malloc get
bigger the more space is used in an allocset. This reduces the malloc
overhead very substantially on queries that need lots of memory.
Tom Lane [Sat, 22 May 1999 17:47:54 +0000 (17:47 +0000)]
Modify backend switch parsing to prevent 'insecure' switches
from being accepted when they are passed from client connection request.
Get rid of a couple that no longer do anything (like -P).
Jan Wieck [Thu, 20 May 1999 12:12:55 +0000 (12:12 +0000)]
Fixed shift/reduce conflict
SelectStmt and CursorStmt tried to parse FOR UPDATE ... / FOR READ ONLY.
Cursor now checks that it is read only by looking at forUpdate of Query.
SelectStmt handles FOR READ ONLY too.
Rearrange and consolidate the Admin Guide.
Add reference pages for utilities and remove standalone chapters for same.
Add material for an appendix on date/time properties, but not yet
integrated with the User's Guide.
Break up the former chapter on pg_options
into Admin and Programmer's Guides.
Tom Lane [Thu, 20 May 1999 02:57:15 +0000 (02:57 +0000)]
Update CREATE FUNCTION docs: mention use of AS clause with
INTERNAL functions, add a warning about trying to overload function names
for dynamically loaded C functions (from old man page).
Tom Lane [Tue, 18 May 1999 23:40:05 +0000 (23:40 +0000)]
Add Aggref and ArrayRef to the set of node types that transformExpr
will pass through rather than spitting up. This is necessary to handle
cases where coerce_type causes a subexpression to be retransformed, as in
SELECT count(*) + 1.0 FROM table
Tom Lane [Tue, 18 May 1999 21:36:10 +0000 (21:36 +0000)]
Now that hashjoin is reliable for large joins (knock on wood),
remove optimizer's arbitrary limit on how large a join it will use hashing
for. (The limit was too large to prevent the problems we'd been seeing,
anyway...)
Tom Lane [Tue, 18 May 1999 21:33:06 +0000 (21:33 +0000)]
Rewrite hash join to use simple linked lists instead of a
fixed-size hashtable. This should prevent 'hashtable out of memory' errors,
unless you really do run out of memory. Note: target size for hashtable
is now taken from -S postmaster switch, not -B, since it is local memory
in the backend rather than shared memory.
Bruce Momjian [Mon, 17 May 1999 06:38:41 +0000 (06:38 +0000)]
This is actually more of a fundamental problem with mdtruncate. It
looks
like someone just didn't add support for multiple segments for
truncation.
The following patch seems to do the right thing, for me at least.
It passed my tests, my data looks right(no data that shouldn't be in
there) and regression is ok.
Tom Lane [Mon, 17 May 1999 00:25:34 +0000 (00:25 +0000)]
Change GEQO optimizer to release memory after each gene
is evaluated. This bounds memory usage to something reasonable even
when many tables are being joined.
Bruce Momjian [Sat, 15 May 1999 22:31:07 +0000 (22:31 +0000)]
I made it so it rolled over files at 1MB. My table ended up with 120
segments, and my indexes had 3(Yes, it DOES work!).
DROP TABLE removed ALL segments from the table, but only the main index
segment.
So it looks like removing the table itself is using mdunlink in md.c,
while removing indexes uses FileNameUnlink() which only unlinks 1 file.
As far as I can tell, calling FileNameUnlink() and mdunlink() is basically
the same, except mdunlink() deletes any extra segments.
I've done some testing and it seems to work. It also passes regression
tests(except float8, geometry and rules, but that's normal).
If this patch is right, this fixes all known multi-segment problems on
Linux.
Bruce Momjian [Sat, 15 May 1999 22:18:51 +0000 (22:18 +0000)]
I've got 2 pretty small patches.
configtype.patch simply fixes a typo in config.h.in
pg_dump.c.patch Updates a bunch of error messages to include a reason
from
the backend, and also removes a couple of unnecessary
if's
Add double quotes around the sequence name generated to support the
SERIAL data type DEFAULT clause.
This fixes a problem finding the sequence name when mixed case table names
are involved.
Tom Lane [Thu, 13 May 1999 07:29:22 +0000 (07:29 +0000)]
Rip out QueryTreeList structure, root and branch. Querytree
lists are now plain old garden-variety Lists, allocated with palloc,
rather than specialized expansible-array data allocated with malloc.
This substantially simplifies their handling and eliminates several
sources of memory leakage.
Several basic types of erroneous queries (syntax error, attempt to
insert a duplicate key into a unique index) now demonstrably leak
zero bytes per query.