- 01 Oct, 2001 1 commit
-
-
Tom Lane authored
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.
-
- 29 Sep, 2001 1 commit
-
-
Tom Lane authored
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.
-
- 06 Jul, 2001 1 commit
-
-
Tom Lane authored
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.
-
- 22 Mar, 2001 1 commit
-
-
Bruce Momjian authored
-
- 24 Jan, 2001 1 commit
-
-
Bruce Momjian authored
-
- 30 Nov, 2000 2 commits
-
-
Vadim B. Mikheev authored
-
Tom Lane authored
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.
-
- 28 Nov, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 08 Nov, 2000 1 commit
-
-
Tom Lane authored
(WAL logging for this is not done yet, however.) Clean up a number of really crufty things that are no longer needed now that DROP behaves nicely. Make temp table mapper do the right things when drop or rename affecting a temp table is rolled back. Also, remove "relation modified while in use" error check, in favor of locking tables at first reference and holding that lock throughout the statement.
-
- 28 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
-
- 23 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
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.
-
- 20 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
-
- 18 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
LockRelId - ie physical information, not logical. It's required for WAL. Regression tests passed.
-
- 16 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
relation OID is used as file node on creation but may be changed later if required. Regression Tests Approved (c) -:)))
-
- 12 Apr, 2000 1 commit
-
-
Bruce Momjian authored
-
- 09 Apr, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 26 Jan, 2000 1 commit
-
-
Bruce Momjian authored
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
-
- 21 Nov, 1999 1 commit
-
-
Tom Lane authored
-
- 24 Sep, 1999 1 commit
-
-
Tom Lane authored
* 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.
-
- 18 Sep, 1999 1 commit
-
-
Tom Lane authored
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.
-
- 16 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 15 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 25 May, 1999 1 commit
-
-
Bruce Momjian authored
-
- 13 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 15 Dec, 1998 1 commit
-
-
Vadim B. Mikheev authored
New code for locking buffer' context.
-
- 01 Sep, 1998 1 commit
-
-
Bruce Momjian authored
-
- 01 Aug, 1998 1 commit
-
-
Vadim B. Mikheev authored
-
- 20 Jul, 1998 1 commit
-
-
Bruce Momjian authored
-
- 13 Jul, 1998 1 commit
-
-
Bruce Momjian authored
-
- 15 Jun, 1998 1 commit
-
-
Bruce Momjian authored
-
- 26 Feb, 1998 1 commit
-
-
Bruce Momjian authored
-
- 24 Jan, 1998 1 commit
-
-
Bruce Momjian authored
-
- 21 Nov, 1997 1 commit
-
-
Bruce Momjian authored
-
- 08 Sep, 1997 3 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
-
- 07 Sep, 1997 1 commit
-
-
Bruce Momjian authored
-
- 19 Aug, 1997 1 commit
-
-
Bruce Momjian authored
-
- 03 Aug, 1997 1 commit
-
-
Bruce Momjian authored
-
- 28 Mar, 1997 1 commit
-
-
Marc G. Fournier authored
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.
-