summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/transam.c
AgeCommit message (Collapse)Author
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-04Update copyrights to 2003.Bruce Momjian
2002-09-04pgindent run.Bruce Momjian
2002-06-20Update copyright to 2002.Bruce Momjian
2002-06-11Katherine Ward wrote:Jan Wieck
> Changes to avoid collisions with WIN32 & MFC names... > 1. Renamed: > a. PROC => PGPROC > b. GetUserName() => GetUserNameFromId() > c. GetCurrentTime() => GetCurrentDateTime() > d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim > > 2. Added _P to some lex/yacc tokens: > CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT Jan
2002-05-25Remove AMI_OVERRIDE tests from tqual.c routines; they aren't necessaryTom Lane
and just slow down normal operations (only fractionally, but a cycle saved is a cycle earned). Improve documentation of AMI_OVERRIDE behavior.
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-08-26Transaction IDs wrap around, per my proposal of 13-Aug-01. MoreTom Lane
documentation to come, but the code is all here. initdb forced.
2001-08-25Replace implementation of pg_log as a relation accessed through theTom Lane
buffer manager with 'pg_clog', a specialized access method modeled on pg_xlog. This simplifies startup (don't need to play games to open pg_log; among other things, OverrideTransactionSystem goes away), should improve performance a little, and opens the door to recycling commit log space by removing no-longer-needed segments of the commit log. Actual recycling is not there yet, but I felt I should commit this part separately since it'd still be useful if we chose not to do transaction ID wraparound.
2001-08-23Ensure that all TransactionId comparisons are encapsulated in macrosTom Lane
(TransactionIdPrecedes, TransactionIdFollows, etc). First step on the way to transaction ID wrap solution ...
2001-07-12Create a new HeapTupleSatisfiesVacuum() routine in tqual.c that embodies theTom Lane
validity checking rules for VACUUM. Make some other rearrangements of the VACUUM code to allow more code to be shared between full and lazy VACUUM. Minor code cleanups and added comments for TransactionId manipulations.
2001-05-14Remove unused tables pg_variable, pg_inheritproc, pg_ipl tables. InitdbBruce Momjian
forced.
2001-03-22Remove dashes in comments that don't need them, rewrap with pgindent.Bruce Momjian
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-03-18Remove NEXTXID xlog record type to avoid three-way deadlock risk.Tom Lane
NEXTXID isn't really necessary, per previous discussion in pghackers, but I mulishy insisted we should put it in anyway. Mea culpa.
2001-03-13XLOG (and related) changes:Tom Lane
* Store two past checkpoint locations, not just one, in pg_control. On startup, we fall back to the older checkpoint if the newer one is unreadable. Also, a physical copy of the newest checkpoint record is kept in pg_control for possible use in disaster recovery (ie, complete loss of pg_xlog). Also add a version number for pg_control itself. Remove archdir from pg_control; it ought to be a GUC parameter, not a special case (not that it's implemented yet anyway). * Suppress successive checkpoint records when nothing has been entered in the WAL log since the last one. This is not so much to avoid I/O as to make it actually useful to keep track of the last two checkpoints. If the things are right next to each other then there's not a lot of redundancy gained... * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs on alternate bytes. Polynomial borrowed from ECMA DLT1 standard. * Fix XLOG record length handling so that it will work at BLCKSZ = 32k. * Change XID allocation to work more like OID allocation. (This is of dubious necessity, but I think it's a good idea anyway.) * Fix a number of minor bugs, such as off-by-one logic for XLOG file wraparound at the 4 gig mark. * Add documentation and clean up some coding infelicities; move file format declarations out to include files where planned contrib utilities can get at them. * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or every CHECKPOINT_TIMEOUT seconds, whichever comes first. It is also possible to force a checkpoint by sending SIGUSR1 to the postmaster (undocumented feature...) * Defend against kill -9 postmaster by storing shmem block's key and ID in postmaster.pid lockfile, and checking at startup to ensure that no processes are still connected to old shmem block (if it still exists). * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency stop, for symmetry with postmaster and xlog utilities. Clean up signal handling in bootstrap.c so that xlog utilities launched by postmaster will react to signals better. * Standalone bootstrap now grabs lockfile in target directory, as added insurance against running it in parallel with live postmaster.
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2000-11-30No more #ifdef XLOG.Vadim B. Mikheev
2000-11-21Put external declarations into header files.Peter Eisentraut
2000-11-03pg_variable is not used in WAL version now.Vadim B. Mikheev
2000-08-03Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.Tom Lane
These two routines will now ALWAYS elog() on failure, whether you ask for a lock or not. If you really want to get a NULL return on failure, call the new routines heap_open_nofail()/heap_openr_nofail(). By my count there are only about three places that actually want that behavior. There were rather more than three places that were missing the check they needed to make under the old convention :-(.
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
1999-09-18Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane
additional argument specifying the kind of lock to acquire/release (or 'NoLock' to do no lock processing). Ensure that all relations are locked with some appropriate lock level before being examined --- this ensures that relevant shared-inval messages have been processed and should prevent problems caused by concurrent VACUUM. Fix several bugs having to do with mismatched increment/decrement of relation ref count and mismatched heap_open/close (which amounts to the same thing). A bogus ref count on a relation doesn't matter much *unless* a SI Inval message happens to arrive at the wrong time, which is probably why we got away with this sloppiness for so long. Repair missing grab of AccessExclusiveLock in DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi. Recommend 'make clean all' after pulling this update; I modified the Relation struct layout slightly. Will post further discussion to pghackers list shortly.
1999-08-08Fix nbtree's failure to clear BTScans list during xact abort.Tom Lane
Also, move responsibility for calling vc_abort into main xact.c list of things-to-call-at-abort. What in the world was it doing down inside of TransactionIdAbort()?
1999-07-15Change #include's to use <> and "" as appropriate.Bruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
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-05-25pgindent run over code.Bruce Momjian
1999-03-30Small cleanups.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-03Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian
1998-12-16Serialized mode works!Vadim B. Mikheev
1998-12-15Initial MVCC code.Vadim B. Mikheev
New code for locking buffer' context.
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-01-07Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian
1998-01-05Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian
1997-11-02Good Bye, Time Travel!Vadim B. Mikheev
1997-09-08Used modified version of indent that understands over 100 typedefs.Bruce Momjian
1997-09-08Add typdefs to pgindent run.Bruce Momjian
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.
1997-09-07Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian
1997-08-19Make functions static where possible, enclose unused functions in #ifdef ↵Bruce Momjian
NOT_USED.
1996-11-27TransactionIdIsInProgress is commented outVadim B. Mikheev
1996-11-27TransactionIdIsInProgress moved to shmem.cVadim B. Mikheev