summaryrefslogtreecommitdiff
path: root/src/backend/access
AgeCommit message (Collapse)Author
1999-08-08Back-patch BTScan abort fix into REL6_5.Tom Lane
1999-08-02Another mass of them... just #include file changes and/or DOUBLEALIGN->MAXALIGNMarc G. Fournier
1999-08-02Another 'mega-commit' of back-patches ...Marc G. Fournier
- integrating the #include file cleanup that Bruce recently did - got the CPU change to adt/Makefile - changing DOUBLEALIGN -> MAXALIGN
1999-07-09cleanupBruce Momjian
1999-07-03Update tuple size check.Bruce Momjian
1999-07-03Fix for insertion of tuple too large.Bruce Momjian
1999-07-03Fix to prevent too large tuple from being created.Bruce Momjian
1999-07-02typo fix.Bruce Momjian
1999-06-29Avoid disk writes for read-only transactions.Vadim B. Mikheev
1999-06-19Change form() to varargform() to prevent portability problems.Bruce Momjian
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-101. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!")Vadim B. Mikheev
and possibly for other cases too: DO NOT cache status of transaction in unknown state (i.e. non-committed and non-aborted ones) Example: T1 reads row updated/inserted by running T2 and cache T2 status. T2 commits. Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED in t_infomask (so cached T2 status is not changed). Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin) return FALSE and T2 decides that t_xmin is not committed and gets ERROR above. It's too late to find more smart way to handle such cases and so I just changed xact status caching and got rid TransactionIdFlushCache() from code. Changed: transam.c, xact.c, lmgr.c and transam.h - last three just because of TransactionIdFlushCache() is removed. 2. heapam.c: T1 marked a row for update. T2 waits for T1 commit/abort. T1 commits. T3 updates the row before T2 locks row page. Now T2 sees that new row t_xmax is different from xact id (T1) T2 was waiting for. Old code did Assert here. New one goes to HeapTupleSatisfiesUpdate. Obvious changes too. 3. Added Assert to vacuum.c 4. bufmgr.c: break Assert(buf->r_locks == 0 && !buf->ri_lock) into two Asserts.
1999-06-07Concurrency... Highest one...Vadim B. Mikheev
DO NOT EVEN TRY TO DO PageGetMaxOffsetNumber BEFORE LockBuffer! -:)
1999-06-07Have to release meta page before reading root one!Vadim B. Mikheev
< 6.5 versions were just not affected by this bug due to locking.
1999-06-061. xact.c: update comments about changing MyProc->xid and MyProc->xmin.Vadim B. Mikheev
2. varsup.c:ReadNewTransactionId(): don't read nextXid from disk - this func doesn't allocate next xid, so ShmemVariableCache->nextXid may be used (but GetNewTransactionId() must be called first). 3. vacuum.c: change elog(ERROR, "Child item....") to elog(NOTICE) - this is not ERROR, proper handling is just not implemented, yet. 4. s_lock.c: increase S_MAX_BUSY by 2 times. 5. shmem.c:GetSnapshotData(): have to call ReadNewTransactionId() _after_ SpinAcquire(ShmemIndexLock).
1999-06-031. Additional fix against ERROR: Child itemid marked as unusedVadim B. Mikheev
in CommitTransaction(). 2. Changes in GetSnapshotData().
1999-06-031. MyProc->xid assignment is moved to GetNewTransactionId so newerVadim B. Mikheev
transactions will not assume that MyProc transaction was committed before snapshot calculations. With old MyProc->xid assignment (in xact.c:StartTransaction()) there was ability to see the same row twice (I used gdb for this)!... 2. Assignments of InvalidTransactionId to MyProc->xid and MyProc->xmin are moved from xact.c:CommitTransaction() to xact.c:RecordTransactionCommit() - this invalidation must be done before releasing transaction locks or bad (too high) XmaxRecent value might be used by vacuum ("ERROR: Child itemid marked as unused" reported by "Hiroshi Inoue" <Inoue@tpf.co.jp>; once again, gdb allowed me reproduce this error).
1999-05-31Clean up memory leaks in LO operations by freeing LO's privateTom Lane
memory context at transaction commit or abort.
1999-05-26Make functions static or NOT_USED as appropriate.Bruce Momjian
1999-05-25Another pgindent run. Sorry folks.Bruce Momjian
1999-05-25Make 0x007f -> (unsigned)0x7f to make pgindent happy.Bruce Momjian
1999-05-25Get rid of page-level locking in btree-s.Vadim B. Mikheev
LockBuffer is used to acquire read/write access to index pages. Pages are released before leaving index internals.
1999-05-25pgindent run over code.Bruce Momjian
1999-05-13Release allocated memory during AtAbort_Memory.Tom Lane
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-09Add 'temporary file' facility to fd.c, and arrange for tempTom Lane
files to be closed automatically at transaction abort or commit, should they still be open. Also close any still-open stdio files allocated with AllocateFile at abort/commit. This should eliminate problems with leakage of file descriptors after an error. Also, put in some primitive buffered-IO support so that psort.c can use virtual files without severe performance penalties.
1999-05-07Fix LMGR for MVCC.Vadim B. Mikheev
Get rid of Extend lock mode.
1999-05-01Patch from "Hiroshi Inoue" <Inoue@tpf.co.jp> forVadim B. Mikheev
FATAL 1:btree: BTP_CHAIN flag was expected
1999-05-01Use page-level ExtendLock lock instead of table-level -Vadim B. Mikheev
should be faster.
1999-04-25My first cut at libpq revision didn't handle MULTIBYTE correctly,Tom Lane
but I think it's OK now...
1999-04-25Revise backend libpq interfaces so that messages to the frontendTom Lane
can be generated in a buffer and then sent to the frontend in a single libpq call. This solves problems with NOTICE and ERROR messages generated in the middle of a data message or COPY OUT operation.
1999-04-22Fix duplicating ROOT page in concurrent updates.Vadim B. Mikheev
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-12Unique btree-s:Vadim B. Mikheev
/* * Have to check is inserted heap tuple deleted one * (i.e. just moved to another place by vacuum)! */
1999-03-30Small cleanups.Bruce Momjian
1999-03-281. Vacuum is updated for MVCC.Vadim B. Mikheev
2. Much faster btree tuples deletion in the case when first on page index tuple is deleted (no movement to the left page(s)). 3. Remember blkno of new root page in BTPageOpaque of left/right siblings when root page is splitted.
1999-03-14cleanupBruce Momjian
1999-03-14compile cleanupBruce Momjian
1999-03-14Compile cleanupBruce Momjian
1999-03-14Enclosed below I have a patch to allow a btree index on the int8 type.Bruce Momjian
I would like some feedback on what the hash function for the int8 hash function in the ./backend/access/hash/hashfunc.c should return. Also, could someone (maybe Tomas Lockhart?) look-over the patch and make sure the system table entries are correct? I've tried to research them as much as I could, but some of them are still not clear to me. Thanks, -Ryan
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-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-01-29READ COMMITTED isolevel is implemented and is default now.Vadim B. Mikheev
1999-01-27Turns out it's easy to cache the fmgr function lookupTom Lane
result, too ... another little bit of speed for SELECT.
1999-01-27Another SELECT speedup: extract OIDs of column print functionsTom Lane
only once per SELECT, not once per tuple. 10% here, 10% there, pretty soon you're talking about real speedups ...
1999-01-24Tighten coding of inner loops in nocachegetattr ...Tom Lane
seems to have improved speed of routine by 5% or so ...