summaryrefslogtreecommitdiff
path: root/src/backend/executor
AgeCommit message (Collapse)Author
1999-07-11ExecReScanGroup() forgot to clear grpstate->grp_firstTuple,Tom Lane
thereby guaranteeing wrong results from a rescanned Group node.
1999-06-17Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGNBruce Momjian
for Irix.
1999-06-12When targetlist is NULL, ExecTargetList was passing back aTom Lane
pointer to palloc'd but uninitialized memory. This is not cool; anyone looking at the returned 'tuple' would at best coredump and at worst behave in a bizarre and irreproducible way. Fix it to return a predictable value, namely a correctly-set-up palloc'd tuple containing zero attributes. I believe this fix is both safe and critical.
1999-06-12Reversed out Massimo patch.Bruce Momjian
1999-06-12I don't like last minute patches before the final freeze, but I believe thatBruce Momjian
this one could be useful for people experiencing out-of-memory crashes while executing queries which retrieve or use a very large number of tuples. The problem happens when storage is allocated for functions results used in a large query, for example: select upper(name) from big_table; select big_table.array[1] from big_table; select count(upper(name)) from big_table; This patch is a dirty hack that fixes the out-of-memory problem for the most common cases, like the above ones. It is not the final solution for the problem but it can work for some people, so I'm posting it. The patch should be safe because all changes are under #ifdef. Furthermore the feature can be enabled or disabled at runtime by the `free_tuple_memory' options in the pg_options file. The option is disabled by default and must be explicitly enabled at runtime to have any effect. To enable the patch add the follwing line to Makefile.custom: CUSTOM_COPT += -DFREE_TUPLE_MEMORY To enable the option at runtime add the following line to pg_option: free_tuple_memory=1 Massimo
1999-06-09Reset evaluation plan tuple table next free slot counter to 0Vadim B. Mikheev
after ExecEndNode. It must be done! Or we'll be out of free tuple slots very soon, though slots are freed by ExecEndNode and ready for reusing. We didn't see this problem before because of int nSlots = ExecCountSlotsNode(plan); TupleTable tupleTable = ExecCreateTupleTable(nSlots + 10); /* why add ten? - jolly */ code in InitPlan - i.e. extra 10 slots. Simple select uses 3 slots and so it was possible to re-use evaluation plan 3 additional times and didn't get elog(NOTICE, "Plan requires more slots than are available"); elog(ERROR, "send mail to your local executor guru to fix this"); Changes are obvious and shouldn't be problems with them. Though, I added Assert(epqstate->es_tupleTable->next == 0) before EvalPlanQual():ExecInitNode and we'll notice if something is still wrong. Is it better to change Assert to elog(ERROR) ?
1999-06-06I used bad style of comments and ... commented out some code inVadim B. Mikheev
EvalPlanQualNext() when implemented it... -:) Uncommented...
1999-06-03Ensure consistent results when FormSortKeys fails to findTom Lane
all the expected keys (it was returning uninitialized memory).
1999-05-25Another pgindent run. Sorry folks.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-05-18Rewrite hash join to use simple linked lists instead of aTom Lane
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.
1999-05-17Change resjunk to a boolean.Bruce Momjian
1999-05-13Rip out QueryTreeList structure, root and branch. QuerytreeTom Lane
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.
1999-05-10Change error messages to oids come out as %u and not %d. Change has noBruce Momjian
real affect now.
1999-05-09Update hash and join routines to use fd.c's new temp-fileTom Lane
code, instead of not-very-bulletproof stuff they had before.
1999-05-06Fix some nasty coredump bugs in hashjoin. This code was justTom Lane
about certain to fail anytime it decided the relation to be hashed was too big to fit in memory --- the code for 'batching' a series of hashjoins had multiple errors. I've fixed the easier problems. A remaining big problem is that you can get 'hashtable out of memory' if the code's guesstimate about how much overflow space it will need turns out wrong. That will require much more extensive revisions to fix, so I'm committing these fixes now before I start on that problem.
1999-04-29Aggregate functions didn't work on subscripted array references.Tom Lane
Things are better now.
1999-04-19Fix problems seen when result of a subselect was used in anTom Lane
expression context (ie, not at the top level of a WHERE clause). Examples like this one work now: SELECT name, value FROM t1 as touter WHERE (value/(SELECT AVG(value) FROM t1 WHERE name = touter.name)) > 0.75;
1999-04-13There are some bugs about backward scanning usingBruce Momjian
indexes. 1. Index Scan using plural indexids never scan backward as to the order of indexids. 2. The cursor using Index scan is not usable after moving past the end. This patch solves above bugs. Moreover the change of _bt_first() would be useful to extend ORDER BY patch by Jan Wieck for all descending order cases. Hiroshi Inoue
1999-04-07Fix some more hashjoin-related bugs in pg_operator. FixTom Lane
hashjoin's hashFunc() so that it does the right thing with pass-by-value data types (the old code would always return 0 for int2 or char values, which would work but would slow things down a lot). Extend opr_sanity regress test to catch more kinds of errors.
1999-03-30Small cleanups.Bruce Momjian
1999-03-23Remove Tee code, move to _deadcode.Bruce Momjian
1999-03-21Correct some comments, fix a small memory wastage when datatypeTom Lane
is pass-by-value.
1999-03-20Reverse out pfree agg part of patch from Erik Riedel.Bruce Momjian
1999-03-20cleanupBruce Momjian
1999-03-20Fix for aggregate memory leaks from Erik Riedel.Bruce Momjian
1999-03-19Fix for memory leak in executor with fjIsNull.Bruce Momjian
1999-03-19I suggest the following portability patch, which does notBruce Momjian
change functionality, but makes the code more ANSI C'ish. My AIX xlc compiler barfs on all of these. Can someone please review and apply to current. <<port.patch>> Thanks Andreas
1999-03-14CleanupBruce Momjian
1999-03-10We have to return dummy tuple for empty targetlist!Vadim B. Mikheev
Try select t1.x from t1, t2 where t1.y = 1 and t2.y = 1 - t2 scan target list will be empty and so no one tuple will be returned...
1999-03-09Changes to fix/improve the dynamic loading on NTMarc G. Fournier
From: Horak Daniel <horak@mmp.plzen-city.cz>
1999-02-28Fix executor to work correctly with mergejoins where left andTom Lane
right sides have different data types.
1999-02-24update commentsBruce Momjian
1999-02-23Fix typos in comments.Thomas G. Lockhart
1999-02-23Add first code to help with outer joins.Thomas G. Lockhart
Enable by defining CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG in your Makefile.custom
1999-02-23Fix typo in comment.Thomas G. Lockhart
1999-02-22comment cleanup.Bruce Momjian
1999-02-21From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1999-02-09Rename Temp to Noname for noname tables.Bruce Momjian
1999-02-08Added LIMIT/OFFSET functionality including new regression test for it.Jan Wieck
Removed CURRENT keyword for rule queries and changed rules regression accordingly. CURRENT has beed announced to disappear in v6.5. Jan
1999-02-07Changed ExecConstraints() and ExecRelCheck() to cache the constraintsJan Wieck
qualification expression trees in the execution state. Prevents from memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK constraints. Speedup against the variant using freeObject() is more than factor 2. Jan
1999-02-07Missing semicolon in last fix :-}Jan Wieck
Jan
1999-02-07One more fix to QuerySnapshot usage in ExecutorStart(). MaybeJan Wieck
current QuerySnapshot could be NULL. Jan
1999-02-07Fixed problem with multiple portals shown up in portals_p2 regressionJan Wieck
test after new AllocSet code. Activated optimal AllocSet blocksize and chunk limit. Jan
1999-02-06New alloc set code using a memory block pool for small allocations.Jan Wieck
Jan
1999-02-03Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian
1999-02-02Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.Bruce Momjian
1999-02-01Initialize es_snapshot.Vadim B. Mikheev
1999-01-29Small fix for READ COMMITTED isolevel.Vadim B. Mikheev