summaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree/nbtree.c
Commit message (Collapse)AuthorAgeFilesLines
* Add index recreation suggestion to end of world error message.Bruce Momjian1999-11-141-2/+2
|
* Final stage of psort reconstruction work: replace psort.c withTom Lane1999-10-171-16/+14
| | | | | | | a generalized module 'tuplesort.c' that can sort either HeapTuples or IndexTuples, and is not tied to execution of a Sort node. Clean up memory leakages in sorting, and replace nbtsort.c's private implementation of mergesorting with calls to tuplesort.c.
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-181-8/+9
| | | | | | | | | | | | | | | | | additional argument specifying the kind of lock to acquire/release (or 'NoLock' to do no lock processing). Ensure that all relations are locked with some appropriate lock level before being examined --- this ensures that relevant shared-inval messages have been processed and should prevent problems caused by concurrent VACUUM. Fix several bugs having to do with mismatched increment/decrement of relation ref count and mismatched heap_open/close (which amounts to the same thing). A bogus ref count on a relation doesn't matter much *unless* a SI Inval message happens to arrive at the wrong time, which is probably why we got away with this sloppiness for so long. Repair missing grab of AccessExclusiveLock in DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi. Recommend 'make clean all' after pulling this update; I modified the Relation struct layout slightly. Will post further discussion to pghackers list shortly.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-6/+1
|
* Final cleanup.Bruce Momjian1999-07-161-8/+8
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-151-8/+8
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-151-6/+1
|
* Concurrency... Highest one...Vadim B. Mikheev1999-06-071-5/+8
| | | | | | DO NOT EVEN TRY TO DO PageGetMaxOffsetNumber BEFORE LockBuffer! -:)
* Make 0x007f -> (unsigned)0x7f to make pgindent happy.Bruce Momjian1999-05-251-6/+7
|
* Get rid of page-level locking in btree-s.Vadim B. Mikheev1999-05-251-24/+29
| | | | | | LockBuffer is used to acquire read/write access to index pages. Pages are released before leaving index internals.
* pgindent run over code.Bruce Momjian1999-05-251-10/+10
|
* 1. Vacuum is updated for MVCC.Vadim B. Mikheev1999-03-281-19/+18
| | | | | | | 2. Much faster btree tuples deletion in the case when first on page index tuple is deleted (no movement to the left page(s)). 3. Remember blkno of new root page in BTPageOpaque of left/right siblings when root page is splitted.
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-211-2/+2
| | | | | | Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-131-2/+2
|
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-271-2/+2
|
* Alignment cleanup so no more massive switch statements for alignment,Bruce Momjian1998-09-071-2/+2
| | | | just two macros.
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-42/+41
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-011-8/+9
|
* From: Massimo Dal Zotto <dz@cs.unitn.it>Marc G. Fournier1998-08-251-3/+3
| | | | | | | | | | | | > tprintf.patch > > tprintf.patch > > adds functions and macros which implement a conditional trace package > with the ability to change flags and numeric options of running > backends at runtime. > Options/flags can be specified in the command line and/or read from > the file pg_options in the data directory.
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-191-13/+9
| | | | | | | | | | | | | no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
* Fix scan adjustment.Vadim B. Mikheev1998-07-301-2/+103
|
* Use Snapshot in heap access methods.Vadim B. Mikheev1998-07-271-2/+2
|
* Remove un-needed braces around single statements.Bruce Momjian1998-06-151-7/+1
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-3/+3
|
* Remove all time travel stuff. Small parser cleanup.Bruce Momjian1997-11-201-2/+2
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-081-5/+5
|
* Add typdefs to pgindent run.Bruce Momjian1997-09-081-2/+2
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-081-43/+43
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-071-447/+480
|
* Bug: backend crashes in btbeginscan()->btrescan()->_bt_orderkeys()Vadim B. Mikheev1997-05-051-20/+5
| | | | | | | | | when btree used in innerscan with run-time key which value passed by pointer. Fix: keys ordering stuff moved to _bt_first(). Pointed by Thomas Lockhart.
* #ifdef BTREE_BUILD_STATS enables to get executor stats for btreeVadim B. Mikheev1997-04-181-14/+18
| | | | building.
* + NULLs handlingVadim B. Mikheev1997-03-241-8/+20
| | | | | | | | | | | Actually required by multi-column indices support. We still don't use btree for 'A is (not) null', but now btree keep items with NULL attrs using single rule for placing/finding items on pages: NULLs greater NOT_NULLs and NULL = NULL. + Bulkload code (nbtsort.c) support for multi-column indices building and NULLs. + Fix for btendscan()->pfree(scanopaque) from Chris Dunlop.
* Patches for Vadim's multikey indexing...Marc G. Fournier1997-03-181-2/+5
|
* Added: UNIQUE feature to bulkload code.Vadim B. Mikheev1997-02-221-2/+2
|
* Update btree patches that were missed.Bruce Momjian1997-02-181-1/+1
|
* What looks like some *major* improvements to btree indexing...Marc G. Fournier1997-02-121-22/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches from: aoki@CS.Berkeley.EDU (Paul M. Aoki) i gave jolly my btree bulkload code a long, long time ago but never gave him a bunch of my bugfixes. here's a diff against the 6.0 baseline. for some reason, this code has slowed down somewhat relative to the insertion-build code on very small tables. don't know why -- it used to be within about 10%. anyway, here are some (highly unscientific!) timings on a dec 3000/300 for synthetic tables with 10k, 100k and 1000k tuples (basically, 1mb, 10mb and 100mb heaps). 'c' means clustered (pre-sorted) inputs and 'u' means unclustered (randomly ordered) inputs. the 10k table basically fits in the buffer pool, but the 100k and 1000k tables don't. as you can see, insertion build is fine if you've sorted your heaps on your index key or if your heap fits in core, but is absolutely horrible on unordered data (yes, that's 7.5 hours to index 100mb of data...) because of the zillions of random i/os. if it doesn't work for you for whatever reason, you can always turn it back off by flipping the FastBuild flag in nbtree.c. i don't have time to maintain it. good luck! baseline code: time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest real 8.6 time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest real 9.1 time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest real 59.2 time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest real 652.4 time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest real 636.1 time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest real 26772.9 bulkloading code: time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest real 11.3 time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest real 10.4 time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest real 59.5 time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest real 63.5 time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest real 636.9 time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest real 701.0
* index_insert has now HeapRelation as last param (forVadim B. Mikheev1997-01-101-4/+4
| | | | unique index implementation).
* Remove PERFECT_MEMBruce Momjian1996-11-151-8/+4
| | | | Unallocate opaque.
* Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>Marc G. Fournier1996-11-131-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Unique index capability works using the syntax 'create unique index'. * Duplicate OID's in the system tables are removed. I put little scripts called 'duplicate_oids' and 'find_oid' in include/catalog that help to find and remove duplicate OID's. I also moved 'unused_oids' from backend/catalog to include/catalog, since it has to be in the same directory as the include files in order to work. * The backend tries converting the name of a function or aggregate to all lowercase if the original name given doesn't work (mostly for compatibility with ODBC). * You can 'SELECT NULL' to your heart's content. * I put my _bt_updateitem fix in instead, which uses _bt_insertonpg so that even if the new key is so big that the page has to be split, everything still works. * All literal references to system catalog OID's have been replaced with references to define'd constants from the catalog header files. * I added a couple of node copy functions. I think this was a preliminary attempt to get rules to work.
* Almost done access...Marc G. Fournier1996-11-051-19/+15
|
* More include file cleanupsMarc G. Fournier1996-11-031-15/+2
|
* Changes required so that access/* compiles cleanly...Marc G. Fournier1996-11-031-25/+5
| | | | cleaning up behind myself before *yawn* bed :)
* Take out the PERFECT_MMGR #ifdefs:Marc G. Fournier1996-10-241-3/+1
| | | | | | | | | | | My guess is that the thing had bugs, and the pfree was commented out. The thing is probabally free'ed anyway at the end, so it was not a bad thing. If it does cause a bug, it will generate an error when hit, so I say unless someone else knows, let's remove it and run the regression test. -Bruce
* Major code cleanups from D'arcy (-Wall -Werror)Marc G. Fournier1996-10-231-4/+17
|
* #include file cleanupMarc G. Fournier1996-10-201-13/+41
|
* There, now we support GiST...now what? :)Marc G. Fournier1996-08-261-2/+8
|
* Fixes:Marc G. Fournier1996-07-301-26/+40
| | | | | | | | | | | | > INDEXED searches in some cases DO NOT WORK. > Although simple search expressions (i.e. with a constant value on > the right side of an operator) work, performing a join (by putting > a field of some other table on the right side of an operator) produces > empty output. > WITHOUT indices, everything works fine. > submitted by: "Vadim B. Mikheev" <root@ais.sable.krasnoyarsk.su>
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-091-0/+516