summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
AgeCommit message (Collapse)Author
2006-05-19Call MarkBufferDirty() before XLogInsert() during completion of insertTeodor Sigaev
2006-05-19Simplify gistSplit() and some refactoring related code.Teodor Sigaev
2006-05-19Rework completion of incomplete inserts. Now it writesTeodor Sigaev
WAL log during inserts.
2006-05-17Reduce size of critial section during vacuum full, criticalTeodor Sigaev
sections now isn't nested. All user-defined functions now is called outside critsections. Small improvements in WAL protocol. TODO: improve XLOG replay
2006-05-10Reduce size of critical section and remove call of user-defined functions inTeodor Sigaev
insertion and deletion, modify gistSplit() to do not use buffers. TODO: gistvacuumcleanup and XLOG
2006-04-03Fix thinko in gistRedoPageUpdateRecord: if XLR_BKP_BLOCK_1 is set, weTom Lane
don't have anything to do to the page, but we still have to adjust the incomplete_inserts list that we're maintaining in memory.
2006-03-31Clean up WAL/buffer interactions as per my recent proposal. Get rid of theTom Lane
misleadingly-named WriteBuffer routine, and instead require routines that change buffer pages to call MarkBufferDirty (which does exactly what it says). We also require that they do so before calling XLogInsert; this takes care of the synchronization requirement documented in SyncOneBuffer. Note that because bufmgr takes the buffer content lock (in shared mode) while writing out any buffer, it doesn't matter whether MarkBufferDirty is executed before the buffer content change is complete, so long as the content change is completed before releasing exclusive lock on the buffer. So it's OK to set the dirtybit before we fill in the LSN. This eliminates the former kluge of needing to set the dirtybit in LockBuffer. Aside from making the code more transparent, we can also add some new debugging assertions, in particular that the caller of MarkBufferDirty must hold the buffer content lock, not merely a pin.
2006-03-30Improve gist XLOG code to follow the coding rules needed to preventTom Lane
torn-page problems. This introduces some issues of its own, mainly that there are now some critical sections of unreasonably broad scope, but it's a step forward anyway. Further cleanup will require some code refactoring that I'd prefer to get Oleg and Teodor involved in.
2006-03-29Clean up and document the API for XLogOpenRelation and XLogReadBuffer.Tom Lane
This commit doesn't make much functional change, but it does eliminate some duplicated code --- for instance, PageIsNew tests are now done inside XLogReadBuffer rather than by each caller. The GIST xlog code still needs a lot of love, but I'll worry about that separately.
2006-03-24Arrange to emit a description of the current XLOG record as error contextTom Lane
when an error occurs during xlog replay. Also, replace the former risky 'write into a fixed-size buffer with no overflow detection' API for XLOG record description routines; use an expansible StringInfo instead. (The latter accounts for most of the patch bulk.) Qingqing Zhou
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2005-09-22pgindent new GIST index code, per request from Tom.Bruce Momjian
2005-09-22Adjust GiST error messages to conform to message style guidelines.Tom Lane
2005-07-01Improve error messages and add commentTeodor Sigaev
2005-06-30Bug fixes for GiST crash recovery.Teodor Sigaev
- add forgotten check of lsn for insert completion - remove level of pages: hard to check in recovery - some cleanups
2005-06-28Code cleanup. gistfillbuffer accepts InvalidOffsetNumber.Teodor Sigaev
2005-06-27Concurrency for GiSTTeodor Sigaev
- full concurrency for insert/update/select/vacuum: - select and vacuum never locks more than one page simultaneously - select (gettuple) hasn't any lock across it's calls - insert never locks more than two page simultaneously: - during search of leaf to insert it locks only one page simultaneously - while walk upward to the root it locked only parent (may be non-direct parent) and child. One of them X-lock, another may be S- or X-lock - 'vacuum full' locks index - improve gistgetmulti - simplify XLOG records Fix bug in index_beginscan_internal: LockRelation may clean rd_aminfo structure, so move GET_REL_PROCEDURE after LockRelation
2005-06-20fix founded hole in recovery after crash, add vacuum_delay_point()Teodor Sigaev
2005-06-201. full functional WAL for GiSTTeodor Sigaev
2. improve vacuum for gist - use FSM - full vacuum: - reforms parent tuple if it's needed ( tuples was deleted on child page or parent tuple remains invalid after crash recovery ) - truncate index file if possible 3. fixes bugs and mistakes
2005-06-14WAL for GiST. It work for online backup and so on, but onTeodor Sigaev
recovery after crash (power loss etc) it may say that it can't restore index and index should be reindexed. Some refactoring code.