summaryrefslogtreecommitdiff
path: root/src/include/access
AgeCommit message (Collapse)Author
2001-02-26Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occurTom Lane
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.
2001-02-22More comment improvements.Bruce Momjian
2001-02-22Clean up index/btree comments/macros, as approved.Bruce Momjian
2001-02-21Comment improvements.Bruce Momjian
2001-02-15Although we can't support out-of-line TOAST storage in indexes (yet),Tom Lane
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.
2001-02-07Macro for btree runtime fix.Vadim B. Mikheev
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2001-01-23Fix all the places that called heap_update() and heap_delete() withoutTom Lane
bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
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().
2000-12-301. WAL needs in zero-ed content of newly initialized page.Vadim B. Mikheev
2. Log record for PageRepaireFragmentation now keeps array of !LP_USED offnums to redo cleanup properly.
2000-12-28New WAL version - CRC and data blocks backup.Vadim B. Mikheev
2000-12-27Fix portability problems recently exposed by regression tests on Alphas.Tom Lane
1. Distinguish cases where a Datum representing a tuple datatype is an OID from cases where it is a pointer to TupleTableSlot, and make sure we use the right typlen in each case. 2. Make fetchatt() and related code support 8-byte by-value datatypes on machines where Datum is 8 bytes. Centralize knowledge of the available by-value datatype sizes in two macros in tupmacs.h, so that this will be easier if we ever have to do it again.
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-03Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev
critical sections of code.
2000-12-01Make tuple receive/print routines TOAST-aware. Formerly, printtup wouldTom Lane
leak memory when printing a toasted attribute, and printtup_internal didn't work at all...
2000-11-30Remove VARLENA_FIXED_SIZE hack, which is irreversibly broken now thatTom Lane
both MULTIBYTE and TOAST prevent char(n) from being truly fixed-size. Simplify and speed up fastgetattr() and index_getattr() macros by eliminating special cases for attnum=1. It's just as fast to handle the first attribute by presetting its attcacheoff to zero; so do that instead when loading the tupledesc in relcache.c.
2000-11-30No more #ifdef XLOG.Vadim B. Mikheev
2000-11-30XLOG stuff for sequences.Vadim B. Mikheev
CommitDelay in guc.c
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-21Put external declarations into header files.Peter Eisentraut
2000-11-14Minor cleanup of tableOid-related coding.Tom Lane
2000-11-14Clean up comments.Tom Lane
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-11-02Fix insufficiently-parenthesized macro definitions.Tom Lane
No known bug here, but...
2000-10-28WALVadim B. Mikheev
2000-10-25WAL utils defsVadim B. Mikheev
2000-10-24Create empty file so that CVS sources compile (Vadim can fill in realTom Lane
definition later...)
2000-10-24WAL miscVadim B. Mikheev
2000-10-21WALVadim B. Mikheev
2000-10-20redo/undo support functions and cleanups.Vadim B. Mikheev
2000-10-13WALVadim B. Mikheev
2000-10-13WALVadim B. Mikheev
2000-10-04Btree WAL logging.Vadim B. Mikheev
2000-09-12Btree WAL records.Vadim B. Mikheev
2000-09-07Heap redo/undo (except for tuple moving used by vacuum).Vadim B. Mikheev
2000-08-10CREATE btree INDEX takes dead tuples into account when old transactionsHiroshi Inoue
are running.
2000-08-07TOAST mop-up work: update comments for tuple-size-related symbols suchTom Lane
as MaxHeapAttributeNumber. Increase MaxAttrSize to something more reasonable (given what it's used for, namely checking char(n) declarations, I didn't make it the full 1G that it could theoretically be --- 10Mb seemed a more reasonable number). Improve calculation of MaxTupleSize.
2000-08-04Fix tuptoaster bugs induced by making bytea toastable. Durn thing wasTom Lane
trying to toast tuples inserted into toast tables! Fix is two-pronged: first, ensure all columns of a toast table are marked attstorage='p', and second, alter the target chunk size so that it's less than the threshold for trying to toast a tuple. (Code tried to do that but the expression was wrong.) A few cosmetic cleanups in tuptoaster too. NOTE: initdb forced due to change in toaster chunk-size.
2000-08-03Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.Tom Lane
These two routines will now ALWAYS elog() on failure, whether you ask for a lock or not. If you really want to get a NULL return on failure, call the new routines heap_open_nofail()/heap_openr_nofail(). By my count there are only about three places that actually want that behavior. There were rather more than three places that were missing the check they needed to make under the old convention :-(.
2000-07-28Fix sloppy macro coding (not enough parentheses).Tom Lane
2000-07-25Clean up and document btree code for ordering keys. Neat stuff,Tom Lane
actually, but who could understand it with no comments? Fix bug while at it: _bt_orderkeys would try to invoke comparisons on NULL inputs, given the right sort of redundant quals.
2000-07-222nd try for the index tuple toast hack. This time as suggestedJan Wieck
by Tom. Jan
2000-07-21Temporary fix to make TOAST vacuum-safe. All values are forced to beJan Wieck
in memory (plain or compressed) in the tuple returned from the heap-am. So no index will ever contain an external reference. Jan
2000-07-21Major overhaul of btree index code. Eliminate special BTP_CHAIN logic forTom Lane
duplicate keys by letting search go to the left rather than right when an equal key is seen at an upper tree level. Fix poor choice of page split point (leading to insertion failures) that was forced by chaining logic. Don't store leftmost key in non-leaf pages, since it's not necessary. Don't create root page until something is first stored in the index, so an unused index is now 8K not 16K. (Doesn't seem to be as easy to get rid of the metadata page, unfortunately.) Massive cleanup of unreadable code, fix poor, obsolete, and just plain wrong documentation and comments. See src/backend/access/nbtree/README for the gory details.
2000-07-14Cleanup of code for creating index entries. Functional indexes withTom Lane
pass-by-ref data types --- eg, an index on lower(textfield) --- no longer leak memory during index creation or update. Clean up a lot of redundant code ... did you know that copy, vacuum, truncate, reindex, extend index, and bootstrap each basically duplicated the main executor's logic for extracting information about an index and preparing index entries? Functional indexes should be a little faster now too, due to removal of repeated function lookups. CREATE INDEX 'opt_type' clause is deimplemented by these changes, but I haven't removed it from the parser yet (need to merge with Thomas' latest change set first).
2000-07-04Make toast-table creation and deletion work somewhat reliably.Tom Lane
Don't go through pg_exec_query_dest(), but directly to the execution routines. Also, extend parameter lists so that there's no need to change the global setting of allowSystemTableMods, a hack that was certain to cause trouble in the event of any error.
2000-07-04miscVadim B. Mikheev
2000-07-04tuptoaster.h should surely not #include postgres.h.Tom Lane