aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/buf_init.c
Commit message (Collapse)AuthorAge
* Fixed bug where FlushRelationBuffers() did call StrategyInvalidateBuffer()Jan Wieck2004-02-12
| | | | | | | | | | | for already empty buffers because their buffer tag was not cleard out when the buffers have been invalidated before. Also removed the misnamed BM_FREE bufhdr flag and replaced the checks, which effectively ask if the buffer is unpinned, with checks against the refcount field. Jan
* Adjusted calculation of shared memory requirements to newJan Wieck2004-01-15
| | | | | | ARC buffer replacement strategy. Jan
* This patch is the next step towards (re)allowing fork/exec.Bruce Momjian2003-12-20
| | | | Claudio Natoli
* I posted some bufmgr cleanup a few weeks ago, but it conflicted withNeil Conway2003-12-14
| | | | | | | | | | | | | | | | | | | | | | | | some concurrent changes Jan was making to the bufmgr. Here's an updated version of the patch -- it should apply cleanly to CVS HEAD and passes the regression tests. This patch makes the following changes: - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer() macros, and replace uses of them with calls to the appropriate functions. - remove a bunch of #ifdef BMTRACE code: it is ugly & broken (i.e. it doesn't compile) - make BufferReplace() return a bool, not an int - cleanup some logic in bufmgr.c; should be functionality equivalent to the previous code, just cleaner now - remove the BM_PRIVATE flag as it is unused - improve a few comments, etc.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* 2nd try for the ARC strategy.Jan Wieck2003-11-13
| | | | | | | | | I added a couple more Assertions while tracking down the exact cause of the former bug. All 93 regression tests pass now. Jan
* ARC strategy backed out ... sorryJan Wieck2003-11-13
| | | | Jan
* Replacement of the buffer replacement strategy with an ARCJan Wieck2003-11-13
| | | | | | algorithm adopted for PostgreSQL. Jan
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* Remove ShutdownBufferPoolAccess exit callback, and do the work inTom Lane2002-09-25
| | | | | | | | | ProcKill instead, where we still have a PGPROC with which to wait on LWLocks. This fixes 'can't wait without a PROC structure' failures occasionally seen during backend shutdown (I'm surprised they weren't more frequent, actually). Add an Assert() to LWLockAcquire to help catch any similar mistakes in future. Fix failure to update MyProcPid for standalone backends and pgstat processes.
* pgindent run.Bruce Momjian2002-09-04
|
* Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian2002-09-02
| | | | because c.h has sys/types.h.
* Restructure local-buffer handling per recent pghackers discussion.Tom Lane2002-08-06
| | | | | | | | | | | | | | The local buffer manager is no longer used for newly-created relations (unless they are TEMP); a new non-TEMP relation goes through the shared bufmgr and thus will participate normally in checkpoints. But TEMP relations use the local buffer manager throughout their lifespan. Also, operations in TEMP relations are not logged in WAL, thus improving performance. Since it's no longer necessary to fsync relations as they move out of the local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code is no longer needed and has been removed: there's no concept of a dirty relation anymore in md.c/fd.c, and we never fsync anything but WAL. Still TODO: improve local buffer management algorithms so that it would be reasonable to increase NLocBuffer.
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Remove some pre-WAL relics:Bruce Momjian2002-06-15
| | | | | | | | | SharedBufferChanged BufferRelidLastDirtied BufferTagLastDirtied BufferDirtiedByMe Manfred Koizar
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Another round of cleanups for dynahash.c (maybe it's finally clean ofTom Lane2001-10-01
| | | | | | | | | portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
* Implement new 'lightweight lock manager' that's intermediate betweenTom Lane2001-09-29
| | | | | | | | | existing lock manager and spinlocks: it understands exclusive vs shared lock but has few other fancy features. Replace most uses of spinlocks with lightweight locks. All remaining uses of spinlocks have very short lock hold times (a few dozen instructions), so tweak spinlock backoff code to work efficiently given this assumption. All per my proposal on pghackers 26-Sep-01.
* Implement LockBufferForCleanup(), which will allow concurrent VACUUMTom Lane2001-07-06
| | | | | to wait until it's safe to remove tuples and compact free space in a shared buffer page. Miscellaneous small code cleanups in bufmgr, too.
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane2000-12-18
| | | | | | to ensure that we have released buffer refcounts and so forth, rather than putting ad-hoc operations before (some of the calls to) proc_exit. Add commentary to discourage future hackers from repeating that mistake.
* Rearrange bufmgr header files so that buf_internals.h need not beTom Lane2000-11-30
| | | | | | | included by everything that includes bufmgr.h --- it's supposed to be internals, after all, not part of the API! This fixes the conflict against FreeBSD headers reported by Rosenman, by making it unnecessary for s_lock.h to be included by plperl.c.
* Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane2000-11-28
| | | | | | | | | | | IPC key assignment will now work correctly even when multiple postmasters are using same logical port number (which is possible given -k switch). There is only one shared-mem segment per postmaster now, not 3. Rip out broken code for non-TAS case in bufmgr and xlog, substitute a complete S_LOCK emulation using semaphores in spin.c. TAS and non-TAS logic is now exactly the same. When deadlock is detected, "Deadlock detected" is now the elog(ERROR) message, rather than a NOTICE that comes out before an unhelpful ERROR.
* New relcache hash table with RelFileNode as key to be usedVadim B. Mikheev2000-10-23
| | | | | | | from bufmgr - it would be nice to have separate hash in smgr for node <--> fd mappings, but for the moment it's easy to add new hash to relcache. Fixed small bug in xlog.c:ReadRecord.
* I had to change buffer tag: now RelFileNode is used instead ofVadim B. Mikheev2000-10-18
| | | | | LockRelId - ie physical information, not logical. It's required for WAL. Regression tests passed.
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-31
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Buffer manager modifications to keep a local buffer-dirtied bit as wellTom Lane2000-04-09
| | | | | | | | as a shared dirtybit for each shared buffer. The shared dirtybit still controls writing the buffer, but the local bit controls whether we need to fsync the buffer's file. This arrangement fixes a bug that allowed some required fsyncs to be missed, and should improve performance as well. For more info see my post of same date on pghackers.
* 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.
* XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.Vadim B. Mikheev1999-10-06
| | | | | First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
* 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.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Add config.h as needed.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Update #include cleanupsBruce Momjian1999-07-16
|
* Add var defines for no testandsetBruce Momjian1999-06-26
|
* Move default NBuffers setting into config.h, and rename itTom Lane1999-06-12
| | | | | to DEF_NBUFFERS for readability. Make sure the default value is OK according to postmaster.c's new sanity check for -B values.
* pgindent run over code.Bruce Momjian1999-05-25
|
* Repair some pretty serious problems in dynahash.c andTom Lane1999-02-22
| | | | | | shared memory space allocation. It's a wonder we have not seen bug reports traceable to this area ... it's quite clear that the routine dir_realloc() has never worked correctly, for example.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Initial MVCC code.Vadim B. Mikheev1998-12-15
| | | | New code for locking buffer' context.
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Rename BindingTable to ShmemIndex.Bruce Momjian1998-06-27
|
* Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian1998-01-07
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-05
|
* Good Bye, Time Travel!Vadim B. Mikheev1997-11-02
|
* Inline memset() as MemSet().Bruce Momjian1997-09-18
|
* Inline frequently called functions.Bruce Momjian1997-09-18
|