summaryrefslogtreecommitdiff
path: root/src/backend/access/transam
AgeCommit message (Collapse)Author
2001-02-22Avoid 'FATAL: out of free buffers: time to abort !" errorHiroshi Inoue
during WAL recovery. Recovery failure is always serious.
2001-02-18Change default commit_delay to zero, update documentation.Tom Lane
2001-02-18Change s_lock to not use any zero-delay select() calls; these are just aTom Lane
waste of cycles on single-CPU machines, and of dubious utility on multi-CPU machines too. Tweak s_lock_stuck so that caller can specify timeout interval, and increase interval before declaring stuck spinlock for buffer locks and XLOG locks. On systems that have fdatasync(), use that rather than fsync() to sync WAL log writes. Ensure that WAL file is entirely allocated during XLogFileInit.
2001-02-13Comments about GetFreeXLBuffer().Vadim B. Mikheev
GetFreeXLBuffer(): use Insert->LgwrResult instead of private LgwrResult copy if it's more fresh (attempt to avoid acquiring info_lck/lgwr_lck).
2001-02-13Removed abort() in XLogFileOpen.Vadim B. Mikheev
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2001-01-19Make critical sections (elog->crash) and interrupt holdoff sectionsTom Lane
into distinct concepts, per recent discussion on pghackers.
2001-01-18Comment out xlrec in xact_redo - no support for file unlinking onVadim B. Mikheev
commit yet.
2001-01-14Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane
are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
2001-01-12Add more critical-section calls: all code sections that hold spinlocksTom Lane
are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit().
2001-01-091. Checkpoint.undo may be after checkpoint itself:Vadim B. Mikheev
- no more elog(STOP) in StartupXLOG(); - both checkpoint' undo & redo are used to define oldest on-line log file. 2. Ability to pre-allocate a few log files at checkpoint time (wal_files option). Off by default.
2001-01-02Clean up non-reentrant interface for hash_seq/HashTableWalk, so thatTom Lane
starting a new hashtable search no longer clobbers any other search active anywhere in the system. Fix RelationCacheInvalidate() so that it will not crash or go into an infinite loop if invoked recursively, as for example by a second SI Reset message arriving while we are still processing a prior one.
2000-12-30Fixed misprint in heap update WALoging.Vadim B. Mikheev
2000-12-29Fix failure in CreateCheckPoint on some Alpha boxes --- it's not OK toTom Lane
assume that TAS() will always succeed the first time, even if the lock is known to be free. Also, make sure that code will eventually time out and report a stuck spinlock, rather than looping forever. Small cleanups in s_lock.h, too.
2000-12-28New WAL version - CRC and data blocks backup.Vadim B. Mikheev
2000-12-22Revise lock manager to support "session level" locks as well as "transactionTom Lane
level" locks. A session lock is not released at transaction commit (but it is released on transaction abort, to ensure recovery after an elog(ERROR)). In VACUUM, use a session lock to protect the master table while vacuuming a TOAST table, so that the TOAST table can be done in an independent transaction. I also took this opportunity to do some cleanup and renaming in the lock code. The previously noted bug in ProcLockWakeup, that it couldn't wake up any waiters beyond the first non-wakeable waiter, is now fixed. Also found a previously unknown bug of the same kind (failure to scan all members of a lock queue in some cases) in DeadLockCheck. This might have led to failure to detect a deadlock condition, resulting in indefinite waits, but it's difficult to characterize the conditions required to trigger a failure.
2000-12-18>> Here is a patch for the beos port (All regression tests are OK).Bruce Momjian
>> xlog.c : special case for beos to avoid 'link' which does not work yet >> beos/sem.c : implementation of new sem_ctl call (GETPID) and a new >sem_op >> flag (IPCNOWAIT) >> dynloader/beos.c : add a verification of symbol validity (seem that the >> loader sometime return OK with an invalid symbol) >> postmaster.c : add beos forking support for the new checkpoint process >> postgres.c : remove beos special case for getrusage >> beos.h : Correction of a bas definition of AF_UNIX, misc defnitions >> >> >> thanks >> >> >> cyril Cyril VELTER
2000-12-18Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane
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.
2000-12-11Remove elog for online log files.Vadim B. Mikheev
2000-12-11elog(LOG)-->elog(DEBUG) for skipped logs.Vadim B. Mikheev
2000-12-08Resurrect -F switch: it controls fsyncs again, though the fsyncs areTom Lane
mostly just on the WAL logfile nowadays. But if people want to disable fsync for performance, why should we say no?
2000-12-07RecordTransactionAbort() shouldn't log XLOG_XACT_ABORTHiroshi Inoue
if the transaction has already been committed ?
2000-12-03Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev
critical sections of code.
2000-11-30No more #ifdef XLOG.Vadim B. Mikheev
2000-11-30XLOG stuff for sequences.Vadim B. Mikheev
CommitDelay in guc.c
2000-11-28Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane
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.
2000-11-27Check for link(2) failure.Tom Lane
2000-11-25Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;Tom Lane
re-adopt these settings at every postmaster or standalone-backend startup. This should fix problems with indexes becoming corrupt due to failure to provide consistent locale environment for postmaster at all times. Also, refuse to start up a non-locale-enabled compilation in a database originally initdb'd with a non-C locale. Suppress LIKE index optimization if locale is not "C" or "POSIX" (are there any other locales where it's safe?). Issue NOTICE during initdb if selected locale disables LIKE optimization.
2000-11-21Refine log/error messages. Print out the errno message, not the number.Peter Eisentraut
Remove timestamps from messages where this would be redundant with the log_timestamp option.
2000-11-21Put external declarations into header files.Peter Eisentraut
2000-11-21miscVadim B. Mikheev
2000-11-21Fix OID bootstraping.Vadim B. Mikheev
2000-11-21Init ShmemVariableCache in BootStrapXLOG()Vadim B. Mikheev
(should fix OID bootstraping).
2000-11-20Include postgres.h before checking #ifdef XLOG.Peter Eisentraut
2000-11-20Compile WAL by default.Vadim B. Mikheev
2000-11-16Change SearchSysCache coding conventions so that a reference count isTom Lane
maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
2000-11-16That variable I removed broke XLOG, that part of the deltaBruce Momjian
should have read: Alfred Perlstein
2000-11-16Make pgsql compile on FreeBSD-alpha.Bruce Momjian
Context diff this time. Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386. Compile with only -O on alpha for codegen safety. Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD. Fix a lot of bogus string formats for outputting pointers (cast to int and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now cast to 'unsigned long' and output with %lu/ Remove an unused variable. Alfred Perlstein
2000-11-10Clean up syscache so that recursive invocation is safe, and remove errorTom Lane
message about recursive use of a syscache. Also remove most of the specialized indexscan routines in indexing.c --- it turns out that catcache.c is perfectly able to perform the indexscan for itself, in fact has already looked up all the information needed to do so! This should be faster as well as needing far less boilerplate code.
2000-11-09Auto checkpoint creation.Vadim B. Mikheev
2000-11-08Make DROP TABLE rollback-able: postpone physical file delete until commit.Tom Lane
(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.
2000-11-05New CHECKPOINT command.Vadim B. Mikheev
Auto removing of offline log files and creating new file at checkpoint time.
2000-11-03pg_variable is not used in WAL version now.Vadim B. Mikheev
2000-10-31Fix recovery cache code (thanks to Peter Eisentraut forVadim B. Mikheev
pointing to bug).
2000-10-29WAL fixes.Vadim B. Mikheev
2000-10-28WALVadim B. Mikheev
2000-10-24Fix AbortOutOfAnyTransaction logic to avoid notice aboutTom Lane
'AbortTransaction and not in in-progress state' when client disconnects just after an error. Notice seems pretty harmless, so I'm not going to worry about back-patching this into 7.0.* ...
2000-10-24WAL miscVadim B. Mikheev
2000-10-23New relcache hash table with RelFileNode as key to be usedVadim B. Mikheev
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.
2000-10-22Makeover for Unixware 7.1.1Peter Eisentraut
* Makefile: Add more standard targets. Improve shell redirection in GNU make detection. * src/backend/access/transam/rmgr.c: Fix incorrect(?) C. * src/backend/libpq/pqcomm.c (StreamConnection): Work around accept() bug. * src/include/port/unixware.h: ...with help from here. * src/backend/nodes/print.c (plannode_type): Remove some "break"s after "return"s. * src/backend/tcop/dest.c (DestToFunction): ditto. * src/backend/nodes/readfuncs.c: Add proper prototypes. * src/backend/utils/adt/numutils.c (pg_atoi): Cope specially with strtol() setting EINVAL. This saves us from creating an extra set of regression test output for the affected systems. * src/include/storage/s_lock.h (tas): Correct prototype. * src/interfaces/libpq/fe-connect.c (parseServiceInfo): Don't use variable as dimension in array definition. * src/makefiles/Makefile.unixware: Add support for GCC. * src/template/unixware: same here * src/test/regress/expected/abstime-solaris-1947.out: Adjust whitespace. * src/test/regress/expected/horology-solaris-1947.out: Part of this file was evidently missing. * src/test/regress/pg_regress.sh: Fix shell. mkdir -p returns non-zero if the directory exists. * src/test/regress/resultmap: Add entries for Unixware.