aboutsummaryrefslogtreecommitdiff
path: root/src/include
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.
* Patches from Cyril Velter to make shared-memory-conflict-detection codeTom Lane2001-03-18
| | | | work in BeOS port.
* 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.
* 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.
* 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.
* 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.
* Don't choke on superuser names containing random punctuation.Tom Lane2001-03-09
|
* Update mysql converter, new version released.Bruce Momjian2001-03-04
|
* Add missing semicolon required by QNX shell.Peter Eisentraut2001-03-01
| | | | from "Tegge, Bernd" <tegge@repas-aeg.de>
* Remove HAVE_OPTARG per discussion in hackers list.Tatsuo Ishii2001-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.
* Mark new text<->date, text<->time, text<->timetz conversion functions asTom Lane2001-02-27
| | | | | | | | noncachable, so that CURRENT_DATE and CURRENT_TIME work as functions again, rather than being collapsed to constants immediately. Marking the reverse conversions noncachable might be overkill, but I'm not sure; do these datatypes have the notion of a CURRENT value? Better safe than sorry, for now.
* Massive commits for SunOS4 port.Tatsuo Ishii2001-02-27
|
* 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.
* Update comments on locks.Bruce Momjian2001-02-23
|
* 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 ...
* 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.
* Add _REGEX_UTILS_H to avoid duplication.Tatsuo Ishii2001-02-22
|
* Comment improvements.Bruce Momjian2001-02-21
|
* Clean out any old versions of no-longer-installed header files that mayTom Lane2001-02-20
| | | | | | be lurking in the install target directory. But don't zap up-to-date headers (so install-all-headers before regular install will work). Per suggestion from Larry Rosenman.
* Remove inclusion of <varargs.h> on SunOS; this does not work since weTom Lane2001-02-20
| | | | | | use the ANSI varargs style (<stdarg.h>) not the old style. Tatsuo had reported this change was necessary back in the 7.0 beta cycle (4/13/00) but for some reason, making the edit never got done.
* Change plpgsql's GET DIAGNOSTICS statement to use SQL99-compatibleTom Lane2001-02-19
| | | | syntax. Fix the RESULT_OID case, which never worked. Add documentation.
* Change s_lock to not use any zero-delay select() calls; these are just aTom Lane2001-02-18
| | | | | | | | | | 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.
* Just noticed that use of 'volatile' in HPPA S_UNLOCK() was causing gccTom Lane2001-02-16
| | | | | to generate unnecessarily stupid code. Tweak macro to describe a series of store-constant ops, not store/load/store/load/store/load/store.
* Clean up two rather nasty bugs in operator selection code.Tom Lane2001-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. If there is exactly one pg_operator entry of the right name and oprkind, oper() and related routines would return that entry whether its input type had anything to do with the request or not. This is just premature optimization: we shouldn't return the single candidate until after we verify that it really is a valid candidate, ie, is at least coercion-compatible with the given types. 2. oper() and related routines only promise a coercion-compatible result. Unfortunately, there were quite a few callers that assumed the returned operator is binary-compatible with the given datatype; they would proceed to call it without making any datatype coercions. These callers include sorting, grouping, aggregation, and VACUUM ANALYZE. In general I think it is appropriate for these callers to require an exact or binary-compatible match, so I've added a new routine compatible_oper() that only succeeds if it can find an operator that doesn't require any run-time conversions. Callers now call oper() or compatible_oper() depending on whether they are prepared to deal with type conversion or not. The upshot of these bugs is revealed by the following silliness in PL/Tcl's selftest: it creates an operator @< on int4, and then tries to use it to sort a char(N) column. The system would let it do that :-( (and evidently has done so since 6.3 :-( :-(). The result in this case was just a silly sort order, but the reverse combination would've provoked coredump from trying to dereference integers. With this fix you get more reasonable behavior: pltcl_test=# select * from T_pkey1 order by key1, key2 using @<; ERROR: Unable to identify an operator '@<' for types 'bpchar' and 'bpchar' You will have to retype this query using an explicit cast
* Take OUTER JOIN semantics into account when estimating the size of joinTom Lane2001-02-16
| | | | | relations. It's not very bright, but at least it now knows that A LEFT JOIN B must produce at least as many rows as are in A ...
* Although we can't support out-of-line TOAST storage in indexes (yet),Tom Lane2001-02-15
| | | | | | | | compressed storage works perfectly well. Might as well have a coherent strategy for applying it, rather than the haphazard store-what-you-get approach that was in the code before. The strategy I've set up here is to attempt compression of any compressible index value exceeding BLCKSZ/16, or about 500 bytes by default.
* Change scoping of table and join refnames to conform to SQL92: a JOINTom Lane2001-02-14
| | | | | | | | | clause with an alias is a <subquery> and therefore hides table references appearing within it, according to the spec. This is the same as the preliminary patch I posted to pgsql-patches yesterday, plus some really grotty code in ruleutils.c to reverse-list a query tree with the correct alias name depending on context. I'd rather not have done that, but unless we want to force another initdb for 7.1, there's no other way for now.
* Please apply the following patch to fix AIX and IRIX timestamp behaviorBruce Momjian2001-02-13
| | | | | | | | | | | | | | | as previously discussed. It makes AIX and IRIX not use DST for dates before 1970. The following expected files need to be removed from the regression tests, they contain wrong results and are not needed any more. src/test/regress/expected/horology-1947-PDT.out src/test/regress/expected/tinterval-1947-PDT.out src/test/regress/expected/abstime-1947-PDT.out Zeugswetter Andreas
* Clean up portability problems in regexp package: change all routineTom Lane2001-02-13
| | | | | | definitions from K&R to ANSI C style, and fix broken assumption that int and long are the same datatype. This repairs problems observed on Alpha with regexps having between 32 and 63 states.
* Hmm, this isn't used either.Tom Lane2001-02-12
|
* Remove unused and largely-broken-anyway compatibility defs.Tom Lane2001-02-12
|
* Rearrange order of operations in heap_create_with_catalog so that ifTom Lane2001-02-12
| | | | | | | | | two transactions create the same table name concurrently, the one that fails will complain about unique index pg_class_relname_index, rather than about pg_type_typname_index which'll confuse most people. Free side benefit: pg_class.reltype is correctly linked to the pg_type entry now. It's been zero in all but the preloaded pg_class entries since who knows when.
* Fix byte-vs-word-width oversight in m68k TAS() code.Tom Lane2001-02-10
| | | | Man, this brings back some old memories ...
* Restructure the key include files per recent pghackers discussion: thereTom Lane2001-02-10
| | | | | | | | | | | are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
* I have deleted the include of termios.h in include/port/qnx4.h.Bruce Momjian2001-02-09
| | | | | | | | | Then I recompiled pgsql and I have compiled a program with ecpg. I have removed the termios.h, and the ECHO hack. Thanks Maurizio
* plpgsql's private copy of xlateSqlType was out of sync. Again. ThisTom Lane2001-02-09
| | | | | is clearly not maintainable, so dike it out in favor of calling the real version in the backend's gram.y.
* Macro for btree runtime fix.Vadim B. Mikheev2001-02-07
|
* Actually, it looks like DEF_PGPORT belongs over in config.h.win32 forTom Lane2001-02-07
| | | | the Windows build...
* Out-of-bounds memory allocation request sizes should be treated as justTom Lane2001-02-06
| | | | | | | elog(ERROR) not an Assert trap, since we've downgraded out-of-memory to elog(ERROR) not a fatal error. Also, change the hard boundary from 256Mb to 1Gb, just so that anyone who's actually got that much memory to spare can play with TOAST objects approaching a gigabyte.
* Apply patches for QNX from MaurizioBruce Momjian2001-02-02
|
* Clean up handling of tuple descriptors so that result-tuple descriptorsTom Lane2001-01-29
| | | | | | | | allocated by plan nodes are not leaked at end of query. This doesn't really matter for normal queries, but it sure does for queries invoked repetitively inside SQL functions. Clean up some other grotty code associated with tupdescs, and fix a few other memory leaks exposed by tests with simple SQL functions.
* Here is an update on the Win32 patch. Modified files are 'config.h.win32'Bruce Momjian2001-01-27
| | | | | | | | | | | | | | | | | and two 'win32.mak'. Addresses the following: 1) Oops. Spelled fcntl.h wrong in the last one. D'uh. 2) PG_VERSION changed to be defined with " around it. psql/command.c failed to compile without that. 3) Changed makefiles to use "/MD" and link both psql and libpq.dll against MSVCRT.DLL instead of a static library. This takes care of the crash-upon-free in psql. I *think* this is what is on the "Open 7.1 Items" list as "Magnus Hagander ODBC Issues?". It has nothing to do with ODBC, but it's the only issue I've been involved with... Magnus Hagander
* Re-read Unix-socket lock file every so often (every CheckPoint interval,Tom Lane2001-01-27
| | | | | | actually) to ensure that its file access time doesn't get old enough to tempt a /tmp directory cleaner to remove it. Still another reason we should never have put the sockets in /tmp in the first place ...
* Re-implement deadlock detection and resolution, per design notes postedTom Lane2001-01-25
| | | | to pghackers on 18-Jan-01.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Add all possible config file options.Bruce Momjian2001-01-24
|