aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
Commit message (Collapse)AuthorAge
...
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Fix for TODO item * spinlock stuck problem when elog(FATAL)Hiroshi Inoue2000-01-17
| | | | and elog(ERROR) inside bufmgr.
* Fixed all elog related warnings, as well as a few others.Peter Eisentraut2000-01-15
|
* Fix it's and its to be correct.Bruce Momjian2000-01-05
|
* Come to think of it, DropBuffers() could have the same problem asTom Lane1999-11-22
| | | | | ReleaseRelationBuffers --- need to wait if anyone is trying to flush out that buffer.
* ReleaseRelationBuffers() failed to check for I/O in progress on a bufferTom Lane1999-11-22
| | | | | | | it wants to release. This leads to a race condition: does the backend that's trying to flush the buffer do so before the one that's deleting the relation does so? Usually no problem, I expect, but on occasion this could lead to hard-to-reproduce complaints from md.c, especially mdblindwrt.
* Commit to make clearer distinction for temp names and real names.Bruce Momjian1999-11-16
| | | | Thanks to Tom Lane for ideas.
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* Make tree compilable (+WAL).Vadim B. Mikheev1999-09-28
|
* Several changes here, not very related but touching some of the same files.Tom Lane1999-09-24
| | | | | | | | | | | | | | | | | | | | | * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22). * Add links to backend PROC structs to sinval's array of per-backend info, and use these links for routines that need to check the state of all backends (rather than the slow, complicated search of the ShmemIndex hashtable that was used before). Add databaseOID to PROC structs. * Use this to implement an interlock that prevents DESTROY DATABASE of a database containing running backends. (It's a little tricky to prevent a concurrently-starting backend from getting in there, since the new backend is not able to lock anything at the time it tries to look up its database in pg_database. My solution is to recheck that the DB is OK at the end of InitPostgres. It may not be a 100% solution, but it's a lot better than no interlock at all...) * In ALTER TABLE RENAME, flush buffers for the relation before doing the rename of the physical files, to ensure we don't get failures later from mdblindwrt(). * Update TRUNCATE patch so that it actually compiles against current sources :-(. You should do "make clean all" after pulling these changes.
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-18
| | | | | | | | | | | | | | | | | 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.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Update #include cleanupsBruce Momjian1999-07-16
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Avoid disk writes for read-only transactions.Vadim B. Mikheev1999-06-29
|
* Removed bad Assert(!buf->ri_lock) when unlocking exclusivelyVadim B. Mikheev1999-06-11
| | | | locked buffer.
* 1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!")Vadim B. Mikheev1999-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Missing semicolons in non-HAS_TEST_AND_SET code paths :-(Tom Lane1999-05-29
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-10
| | | | real affect now.
* 1. Vacuum is updated for MVCC.Vadim B. Mikheev1999-03-28
| | | | | | | 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.
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-21
| | | | | | 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.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.Bruce Momjian1999-02-02
|
* Initial MVCC code.Vadim B. Mikheev1998-12-15
| | | | New code for locking buffer' context.
* Make functions static or ifdef NOT_USED. Prevent pg_version creation.Bruce Momjian1998-10-08
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-19
| | | | | | | | | | | | | no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
* Lmgr cleanup, new locking modes for LLL.Vadim B. Mikheev1998-08-01
|
* Inline function, rename libpq variablees, change lrel to lockrel.Bruce Momjian1998-07-13
|
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* Inline some small functions called for every row.Bruce Momjian1998-04-24
|
* Remove GetDatabaseName/Path and use globals. Make consts later.Bruce Momjian1998-04-05
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-26
|
* Goodbye register keyword. Compiler knows better.Bruce Momjian1998-02-11
|
* From: Peter T Mount <patches@maidast.demon.co.uk>Marc G. Fournier1998-02-02
| | | | | | | | | | | | | | | | [This is a repost - it supercedes the previous one. It fixes the patch so it doesn't bread aix port, plus there's a file missing out of the original post because difforig doesn't pick up new files. It's now attached. peter] This patch brings the JDBC driver up to the current protocol spec. Basically, the backend now tells the driver what authentication scheme to use. The patch also fixes a performance problem with large objects. In the buffer manager, each fastpath call was sending multiple Notifications to the backend (sometimes more data in the form of notifications were being sent than blob data!).
* getpid/pid cleanupBruce Momjian1998-01-25
|
* Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian1998-01-07
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-05
|
* Remove archive stuff.Bruce Momjian1997-11-21
|
* Debug stuff added to BlowawayRelationBuffers().Vadim B. Mikheev1997-10-22
|
* Decrement relation reference count incremented inVadim B. Mikheev1997-10-12
| | | | | RelationIdCacheGetRelation() to flush relations from cache in commit time.
* Blowaway relation buffers from buffer pool before truncation:Vadim B. Mikheev1997-09-22
| | | | + BlowawayRelationBuffers(relation, blocknumber)
* Inline memset() as MemSet().Bruce Momjian1997-09-18
|
* Inline frequently called functions.Bruce Momjian1997-09-18
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-08
|