aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
Commit message (Collapse)AuthorAge
* Fix failure to guarantee that a checkpoint will write out pg_clog updatesTom Lane2004-08-11
| | | | | | for transaction commits that occurred just before the checkpoint. This is an EXTREMELY serious bug --- kudos to Satoshi Okada for creating a reproducible test case to prove its existence.
* Replace opendir/closedir calls throughout the backend with AllocateDirTom Lane2004-02-23
| | | | | | | | | | and FreeDir routines modeled on the existing AllocateFile/FreeFile. Like the latter, these routines will avoid failing on EMFILE/ENFILE conditions whenever possible, and will prevent leakage of directory descriptors if an elog() occurs while one is open. Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not critical code and there is no reason to force a DB restart on failure. All per recent trouble report from Olivier Hubaut.
* Fix typo in message.Tom Lane2003-09-27
|
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-26
|
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* A visit from the message-style police ...Tom Lane2003-07-28
|
* Error message editing in backend/access.Tom Lane2003-07-21
|
* Repair boundary-case bug introduced by patch of two months ago thatTom Lane2003-07-17
| | | | | | | | fixed incorrect initial setting of StartUpID. The logic in XLogWrite() expects that Write->curridx is advanced to the next page as soon as LogwrtResult points to the end of the current page, but StartupXLOG() failed to make that happen when the old WAL ended exactly on a page boundary. Per trouble report from Hannu Krosing.
* Add comment pointing out that XLByteToPrevSeg macro is not broken.Tom Lane2003-06-26
|
* Repair sometimes-incorrect computation of StartUpID after a crash, perTom Lane2003-05-22
| | | | | | | example from Rao Kumar. This is a very corner corner-case, requiring a minimum of three closely-spaced database crashes and an unlucky positioning of the second recovery's checkpoint record before you'd notice any problem. But the consequences are dire enough that it's a must-fix.
* Adjust CreateCheckpoint so that buffer dumping activities and cleanup ofTom Lane2003-05-10
| | | | | | dead xlog segments are not considered part of a critical section. It is not necessary to force a database-wide panic if we get a failure in these operations. Per recent trouble reports.
* In the continuing saga of FE/BE protocol revisions, add reporting ofTom Lane2003-04-25
| | | | | | | | | | | | | initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.)
* Make Win32 tests to match existing Cygwin tests, where appropriate.Bruce Momjian2003-04-18
|
* Make btree index structure adjustments and WAL logging changes needed toTom Lane2003-02-21
| | | | | | | | | | | support btree compaction, as per proposal of a few days ago. btree index pages no longer store parent links, instead they have a level indicator (counting up from zero for leaf pages). The FixBTree recovery logic is removed, and replaced by code that detects missing parent-level insertions during WAL replay. Also, generate appropriate WAL entries when updating btree metapage and when building a btree index from scratch. I believe btree indexes are now completely WAL-legal for the first time. initdb forced due to index and WAL changes.
* Use stat(2) to probe for existing xlog segments in InstallXLogFileSegment,Tom Lane2003-01-25
| | | | | | | | | rather than actually opening the files. This eliminates some corner cases where the file indeed exists but open() fails for another reason, such as being out of file descriptors. The net reliability gain is probably tiny, since xlog.c is full of other file open calls that will elog(PANIC) if they fail for any reason; but this specific failure mode has been observed in the field, so we may as well fix it.
* This patch removes a bunch of superfluous #include directives: ifBruce Momjian2002-11-08
| | | | | | | | postgres.h or c.h includes a system header (such as stdio.h or stdlib.h), there's no need to specifically include it in any of the .c files in the backend. Neil Conway
* Clean up a few fprintf(stderr)'s that should be elog's.Tom Lane2002-11-02
|
* Change order of operations during XLogFlush so that we try to includeTom Lane2002-10-07
| | | | | | | in our write/flush operation any WAL entries that got queued while we were waiting to get the WALWriteLock. This improves throughput when transactions are small enough that several can be committed per WAL write (ie, per disk revolution).
* Ensure that before truncating CLOG, we force a checkpoint even if noTom Lane2002-09-26
| | | | | | recent WAL activity has occurred. Without this, it's possible that a later crash might leave tuples on disk with un-updated commit status bits.
* 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.
* Remove code that suggested increasing wal_files.Bruce Momjian2002-09-01
|
* Complete TODO item:Bruce Momjian2002-08-30
| | | | | * Remove wal_files postgresql.conf option because WAL files are now recycled
* Reverse out XLogDir/-X write-ahead log handling, per discussion.Bruce Momjian2002-08-17
| | | | Original patch from Thomas.
* 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.
* Fix compilation problem with assert checking enabled for recent xlogThomas G. Lockhart2002-08-05
| | | | location feature.
* Implement WAL log location control using "-X" or PGXLOG.Thomas G. Lockhart2002-08-04
|
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Katherine Ward wrote:Jan Wieck2002-06-11
| | | | | | | | | | | | | | > Changes to avoid collisions with WIN32 & MFC names... > 1. Renamed: > a. PROC => PGPROC > b. GetUserName() => GetUserNameFromId() > c. GetCurrentTime() => GetCurrentDateTime() > d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim > > 2. Added _P to some lex/yacc tokens: > CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT Jan
* The attached patch fixes a problem with InstallXLogFileSegment()'s useBruce Momjian2002-06-07
| | | | | | | | | | | | | | | | | | | | | | of link() under Cygwin: http://archives.postgresql.org/pgsql-cygwin/2002-04/msg00072.php Note that it appears that BeOS and Netware also have the above or similar problem. I have only verified that PostgreSQL builds under Cygwin with this patch. Since I cannot reproduce the problem, I cannot verify that the proposed patch solves it. Nevertheless, both Barry Pederson and David P. Caldwell attest that this patch solves the problem. See the following for details: http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00043.php http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00040.php Jason Tishler
* Merge the last few variable.c configuration variables into the genericTom Lane2002-05-17
| | | | | | | | | GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
* Make initdb print a message about which locale it is about to use.Peter Eisentraut2002-05-09
| | | | | Re-add warning if the locale prevents LIKE-optimization. Done within initdb now.
* xlog.c: If possible please add the following patch to better support NetWare.Bruce Momjian2002-04-24
| | | | Ulrich Neumann
* Add fields in the control file to check for whether the backend wasThomas G. Lockhart2002-04-21
| | | | | | | | compiled for integer date/time storage and to check the length of storage for the locale fields in the same data structure. Slightly reword some of the error messages to be more accurate on possible recovery options (e.g. recompile *or* re-initdb). Bump version number on this file.
* Locale support is on by default. The choice of locale is done in initdbPeter Eisentraut2002-04-03
| | | | and/or with GUC variables.
* Repair two problems with WAL logging of sequence nextvalI() ops, asTom Lane2002-03-15
| | | | | | per recent pghackers discussion: force a new WAL record at first nextval after a checkpoint, and ensure that xlog is flushed to disk if a nextval record is the only thing emitted by a transaction.
* Change made to elog:Bruce Momjian2002-03-06
| | | | | | | | | | | | | | | | | | | o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* Add better error text:Bruce Momjian2002-02-18
| | | | | elog(LOG, "XLogWrite: new log file created - " "consider increasing 'wal_files' in postgresql.conf.");
* Reduce severity of 'XLogFlush: request is not satisfied' error condition,Tom Lane2002-01-14
| | | | | | per my proposal of a couple days ago. This will eliminate the unable- to-restart-database class of problem that we have seen reported half a dozen times with 7.1.*.
* Ensure that all direct uses of spinlock-protected data structures useTom Lane2001-12-28
| | | | | | | | | | | 'volatile' pointers to access those structures, so that optimizing compilers will not decide to move the structure accesses outside of the spinlock-acquire-to-spinlock-release sequence. There are no known bugs in these uses at present, but based on bad experience with lwlock.c, it seems prudent to ensure that we protect these other uses too. Per pghackers discussion around 12-Dec. (Note: it should not be necessary to worry about structures protected by LWLocks, since the LWLock acquire and release operations are not inline macros.)
* Fix mispeling ...Tom Lane2001-12-23
|
* Temporarily dike out GetUndoRecPtr() in checkpoint generation, since weTom Lane2001-12-19
| | | | | | do not use the undo pointer anyway. This is a quick-hack solution for the three-way deadlock condition discussed in pghackers 17-Dec-01. Need to find a better way of doing it.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* Merge three existing ways of signaling postmaster from child processes,Tom Lane2001-11-04
| | | | | | | | | | | so that only one signal number is used not three. Flags in shared memory tell the reason(s) for the current signal. This method is extensible to handle more signal reasons without chewing up even more signal numbers, but the immediate reason is to keep pg_pwd reloads separate from SIGHUP processing in the postmaster. Also clean up some problems in the postmaster with delayed response to checkpoint status changes --- basically, it wouldn't schedule a checkpoint if it wasn't getting connection requests on a regular basis.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-28
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* 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.