aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
Commit message (Collapse)AuthorAge
...
* From: Dan McGuirk <mcguirk@indirect.com>Marc G. Fournier1997-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reply-To: hackers@hub.org, Dan McGuirk <mcguirk@indirect.com> To: hackers@hub.org Subject: [HACKERS] tmin writeback optimization I was doing some profiling of the backend, and noticed that during a certain benchmark I was running somewhere between 30% and 75% of the backend's CPU time was being spent in calls to TransactionIdDidCommit() from HeapTupleSatisfiesNow() or HeapTupleSatisfiesItself() to determine that changed rows' transactions had in fact been committed even though the rows' tmin values had not yet been set. When a query looks at a given row, it needs to figure out whether the transaction that changed the row has been committed and hence it should pay attention to the row, or whether on the other hand the transaction is still in progress or has been aborted and hence the row should be ignored. If a tmin value is set, it is known definitively that the row's transaction has been committed. However, if tmin is not set, the transaction referred to in xmin must be looked up in pg_log, and this is what the backend was spending a lot of time doing during my benchmark. So, implementing a method suggested by Vadim, I created the following patch that, the first time a query finds a committed row whose tmin value is not set, sets it, and marks the buffer where the row is stored as dirty. (It works for tmax, too.) This doesn't result in the boost in real time performance I was hoping for, however it does decrease backend CPU usage by up to two-thirds in certain situations, so it could be rather beneficial in high-concurrency settings.
* The second patch adds a more explicative error message to BufferPoolCheckLeak.Marc G. Fournier1997-01-23
| | | | | | It should be completely harmless. Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
* Fixing possible losing data changes:Vadim B. Mikheev1997-01-20
| | | | | | | | | | 1. New flag - BM_JUST_DIRTIED - added for BufferDesc; 2. All data "dirtiers" (WriteBuffer and WriteNoReleaseBuffer) set this flag (and BM_DIRTY too); 3. All data "flushers" (FlushBuffer, BufferSync and BufferReplace) turn this flag off just before calling smgr[blind]write/smgrflush and check this flag after flushing buffer: if it turned ON then BM_DIRTY will stay ON.
* No more LateWrite, but there is WriteMode;Vadim B. Mikheev1997-01-16
| | | | | | SetBufferWriteMode () added; FlushBuffer () fixed: now directly calls smgrflush () and releases buffer only if required by caller.
* ReleaseTmpRelBuffers is ReleaseRelationBuffers now.Vadim B. Mikheev1997-01-14
|
* ReleaseTmpRelBuffers () releases buffers in LOCAL buffer pool nowVadim B. Mikheev1996-12-31
| | | | (if rd_islocal is true).
* Compile and warning cleanupBruce Momjian1996-11-08
|
* Clean up MakefileMarc G. Fournier1996-11-03
| | | | | | Add #include "postgres.h" as required Remove #include "utils/elog.h"
* Fix for pg_log bugMarc G. Fournier1996-09-19
| | | | Submitted by: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
* iBrought in a fix for backend crashesMarc G. Fournier1996-07-23
| | | | Submitted by: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-09