aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Remove NEXTXID xlog record type to avoid three-way deadlock risk.Tom Lane2001-03-18
| | | | | NEXTXID isn't really necessary, per previous discussion in pghackers, but I mulishy insisted we should put it in anyway. Mea culpa.
* When we add 'waiting' to the ps_status display, there should be aTom Lane2001-03-18
| | | | space in front of it. Improve comments a little.
* Considering the BeOS port didn't compile without IPC_STAT and shm_nattch,Tom Lane2001-03-18
| | | | I'm betting the QNX4 port does not either ...
* Patches from Cyril Velter to make shared-memory-conflict-detection codeTom Lane2001-03-18
| | | | work in BeOS port.
* Make sure ControlFile logId/logSeg don't go backwards (barely possible given aTom Lane2001-03-18
| | | | slow backend, if we update unconditionally as the code did before).
* Rearrange XLogFileInit so that control-file spinlock is not held while fillingTom Lane2001-03-17
| | | | | the new log file with zeroes, only while renaming it into place. This should prevent problems with 'stuck spinlock' errors under heavy load.
* Support syncing WAL log to disk using either fsync(), fdatasync(),Tom Lane2001-03-16
| | | | | | | | O_SYNC, or O_DSYNC (as available on a given platform). Add GUC parameter to control sync method. Also, add defense to XLogWrite to prevent it from going nuts if passed a target write position that's past the end of the buffers so far filled by XLogInsert.
* Give a more reasonable error message for a bad attribute name appliedTom Lane2001-03-14
| | | | to a join or subselect alias ... cf. Oliver Elphick's complaint 13-Mar.
* Reduce amount of memory used per tuple for after-event triggers. ThisTom Lane2001-03-14
| | | | is still a memory leak, but a little less bad than it was.
* COPY should handle after-insert triggers the same as execMain.c does.Tom Lane2001-03-14
| | | | | | I'm not sure that it's really necessary to save insert events when there are only after update or delete triggers, but certainly it's wrong for COPY to behave differently from an INSERT query.
* Use SEP_CHAR consistently in forming XLOG pathnames.Tom Lane2001-03-14
|
* Remove obsolete PowerPC-specific hack for comparisons to DBL_MINTom Lane2001-03-14
| | | | | (per recent discussion with Tatsuo). Hopefully the compilers with that old bug are all long gone.
* 'waiting' status display had extra space, removed.Bruce Momjian2001-03-14
| | | | Change the administrator to 'an' administrator.
* Don't go belly-up if fork() fails for a routine checkpoint subprocess.Tom Lane2001-03-14
| | | | Just try again later.
* Fix numeric modulo operator for case of fractional right argument.Tom Lane2001-03-14
|
* New shutdown wording:Bruce Momjian2001-03-14
| | | | This connection has been terminated by the administrator
* ifdef out reindex stuff in VACUUM for safety.Hiroshi Inoue2001-03-14
|
* Change xlog page-header format to include StartUpID. Use the SUI toTom Lane2001-03-13
| | | | | | | | | detect case that next page in log came from an older run than the prior page. This avoids the necessity to re-zero the log after recovery from a crash, which is good because we need not risk destroying valuable log information. This forces another initdb since yesterday :-(. Need to get that log reset utility done...
* XLOG (and related) changes:Tom Lane2001-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Store two past checkpoint locations, not just one, in pg_control. On startup, we fall back to the older checkpoint if the newer one is unreadable. Also, a physical copy of the newest checkpoint record is kept in pg_control for possible use in disaster recovery (ie, complete loss of pg_xlog). Also add a version number for pg_control itself. Remove archdir from pg_control; it ought to be a GUC parameter, not a special case (not that it's implemented yet anyway). * Suppress successive checkpoint records when nothing has been entered in the WAL log since the last one. This is not so much to avoid I/O as to make it actually useful to keep track of the last two checkpoints. If the things are right next to each other then there's not a lot of redundancy gained... * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs on alternate bytes. Polynomial borrowed from ECMA DLT1 standard. * Fix XLOG record length handling so that it will work at BLCKSZ = 32k. * Change XID allocation to work more like OID allocation. (This is of dubious necessity, but I think it's a good idea anyway.) * Fix a number of minor bugs, such as off-by-one logic for XLOG file wraparound at the 4 gig mark. * Add documentation and clean up some coding infelicities; move file format declarations out to include files where planned contrib utilities can get at them. * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or every CHECKPOINT_TIMEOUT seconds, whichever comes first. It is also possible to force a checkpoint by sending SIGUSR1 to the postmaster (undocumented feature...) * Defend against kill -9 postmaster by storing shmem block's key and ID in postmaster.pid lockfile, and checking at startup to ensure that no processes are still connected to old shmem block (if it still exists). * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency stop, for symmetry with postmaster and xlog utilities. Clean up signal handling in bootstrap.c so that xlog utilities launched by postmaster will react to signals better. * Standalone bootstrap now grabs lockfile in target directory, as added insurance against running it in parallel with live postmaster.
* Avoid O(N^2) behavior in deferredTriggerAddEvent() for large numbers ofTom Lane2001-03-12
| | | | | | tuples inserted/deleted/updated in a single transaction. On my machine, this reduced the time to delete 80000 tuples in a foreign-key-referencing table from ~15min to ~8sec.
* FATAL errors should cause exit with nonzero status if we are not runningTom Lane2001-03-10
| | | | | under the postmaster --- specifically, if we are a standalone backend running under the initdb script, this is critical!
* hold interupts during LockWaitCancel().Hiroshi Inoue2001-03-09
|
* A subplan invoked within an aggregate function's argument shouldTom Lane2001-03-08
| | | | | be allowed to receive ungrouped variables of the current query level. Curious that no one reported this bug before...
* Modify wchar conversion routines to not fetch the next byte past the endTom Lane2001-03-08
| | | | | | | | | | | | | of a counted input string. Marinos Yannikos' recent crash report turns out to be due to applying pg_ascii2wchar_with_len to a TEXT object that is smack up against the end of memory. This is the second just-barely- reproducible bug report I have seen that traces to some bit of code fetching one more byte than it is allowed to. Let's be more careful out there, boys and girls. While at it, I changed the code to not risk a similar crash when there is a truncated multibyte character at the end of an input string. The output in this case might not be the most reasonable output possible; if anyone wants to improve it further, step right up...
* Repair a number of places that didn't bother to check whether PageAddItemTom Lane2001-03-07
| | | | | | | | | | succeeds or not. Revise rtree page split algorithm to take care about making a feasible split --- ie, will the incoming tuple actually fit? Failure to make a feasible split, combined with failure to notice the failure, account for Jim Stone's recent bug report. I suspect that hash and gist indices may have the same type of bug, but at least now we'll get error messages rather than silent failures if so. Also clean up rtree code to use Datum rather than char* where appropriate.
* Add missing include.Peter Eisentraut2001-03-01
|
* Tweak portal (cursor) code so that it will not call the executor againTom Lane2001-02-27
| | | | | | | | | | | when user does another FETCH after reaching end of data, or another FETCH backwards after reaching start. This is needed because some plan nodes are not very robust about being called again after they've already returned NULL; for example, MergeJoin will crash in some states but not others. While the ideal approach would be for them all to handle this correctly, it seems foolish to assume that no such bugs would creep in again once cleaned up. Therefore, the most robust answer is to prevent the situation from arising at all.
* Massive commits for SunOS4 port.Tatsuo Ishii2001-02-27
|
* Fix vacuum analyze error.Tatsuo Ishii2001-02-27
| | | | | | | | | | | | | | | | | | vacuum analyze on pg_type fails if bogus entries remain in pg_operator. Here is a sample script to reproduce the problem. drop table t1; create table t1(i int); drop function foo(t1,t1); create function foo(t1,t1) returns bool as 'select true' language 'sql'; create operator = ( leftarg = t1, rightarg = t1, commutator = =, procedure = foo ); drop table t1; vacuum analyze;
* Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occurTom Lane2001-02-26
| | | | | | | | | | | only if at least N other backends currently have open transactions. This is not a great deal of intelligence about whether a delay might be profitable ... but it beats no intelligence at all. Note that the default COMMIT_DELAY is still zero --- this new code does nothing unless that setting is changed. Also, mark ENABLEFSYNC as a system-wide setting. It's no longer safe to allow that to be set per-backend, since we may be relying on some other backend's fsync to have synced the WAL log.
* At least on HPUX, select with delay.tv_sec = 0 and delay.tv_usec = 1000000Tom Lane2001-02-24
| | | | | | does not lead to a one-second delay, but to an immediate EINVAL failure. This causes CHECKPOINT to crash with s_lock_stuck much too quickly :-(. Fix by breaking down the requested wait div/mod 1e6.
* When under postmaster, bogus arguments should cause proc_exit(0) notTom Lane2001-02-24
| | | | | proc_exit(1). Unless you think a system-wide restart is an appropriate response to bogus PGOPTIONS, that is.
* As long as we're fixing this space calculation, let's actually do itTom Lane2001-02-23
| | | | | right. We should MAXALIGN the individual items because we'll allocate them individually, not as an array.
* Bruce Momjian <pgman@candle.pha.pa.us> writes:Bruce Momjian2001-02-23
| | | | | | | | | | | > Is there one LOCKMETHODCTL for every backend? I thought there was only > one of them. >> >> You're right, that line is erroneous; it should read >> >> size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL)); >> >> Not a significant error but it should be changed for clarity ...
* Resolve a compile error.Hiroshi Inoue2001-02-23
|
* Reindex of shared system indexes must be overwrite mode.Hiroshi Inoue2001-02-23
|
* Enhanced UTF-8/SJIS mapping generator, contributed byTatsuo Ishii2001-02-23
| | | | Eiji Tokuya" <e-tokuya@Mail.Sankyo-Unyu.co.jp>
* More comment cleanups.Bruce Momjian2001-02-22
|
* More comment improvements.Bruce Momjian2001-02-22
|
* Clean up index/btree comments/macros, as approved.Bruce Momjian2001-02-22
|
* Change /*---- commants to /* where appropriate. pgindent will tightenBruce Momjian2001-02-22
| | | | up the comments later.
* Avoid 'FATAL: out of free buffers: time to abort !" errorHiroshi Inoue2001-02-22
| | | | during WAL recovery. Recovery failure is always serious.
* Correct bogus output formatting of timeofday() function. A number ofTom Lane2001-02-21
| | | | microseconds < 100000 should be displayed as, eg, 13.000126, not 13.126.
* Change case-folding of keywords to conform to SQL99 and fix misbehaviorTom Lane2001-02-21
| | | | | | | in Turkish locale. Keywords are now checked under pure ASCII case-folding rules ('A'-'Z'->'a'-'z' and nothing else). However, once a word is determined not to be a keyword, it will be case-folded under the current locale, same as before. See pghackers discussion 20-Feb-01.
* Safe guard in case of imporper data is provided to elog()Tatsuo Ishii2001-02-21
| | | | in multi-byte build.
* Make sure -L and -I's for our source tree are always before system includePeter Eisentraut2001-02-20
| | | | or library directories on the command line.
* Truncate incoming username and database name to NAMEDATALEN-1 charactersTom Lane2001-02-20
| | | | so that we don't reject overlength names unnecessarily.
* Change plpgsql's GET DIAGNOSTICS statement to use SQL99-compatibleTom Lane2001-02-19
| | | | syntax. Fix the RESULT_OID case, which never worked. Add documentation.
* Allow extract() to accept the same field selectors as date_part(), not justPeter Eisentraut2001-02-18
| | | | the ones specified by SQL.
* Change default commit_delay to zero, update documentation.Tom Lane2001-02-18
|