summaryrefslogtreecommitdiff
path: root/src/include/access/relscan.h
Commit message (Collapse)AuthorAgeFilesLines
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-051-2/+2
| | | | back-stamped for this.
* pgindent run for 8.2.Bruce Momjian2006-10-041-3/+3
|
* Change the relation_open protocol so that we obtain lock on a relationTom Lane2006-07-311-2/+1
| | | | | | | | | | | | (table or index) before trying to open its relcache entry. This fixes race conditions in which someone else commits a change to the relation's catalog entries while we are in process of doing relcache load. Problems of that ilk have been reported sporadically for years, but it was not really practical to fix until recently --- for instance, the recent addition of WAL-log support for in-place updates helped. Along the way, remove pg_am.amconcurrent: all AMs are now expected to support concurrent update.
* More include file adjustments.Bruce Momjian2006-07-131-2/+1
|
* More include file adjustments.Bruce Momjian2006-07-131-1/+2
|
* Allow include files to compile own their own.Bruce Momjian2006-07-131-1/+2
| | | | | | | Strip unused include files out unused include files, and add needed includes to C files. The next step is to remove unused include files in C files.
* Rewrite btree index scans to work a page at a time in all cases (bothTom Lane2006-05-071-15/+3
| | | | | | | | | | | | | | | | btgettuple and btgetmulti). This eliminates the problem of "re-finding" the exact stopping point, since the stopping point is effectively always a page boundary, and index items are never moved across pre-existing page boundaries. A small penalty is that the keys_are_unique optimization is effectively disabled (and, therefore, is removed in this patch), causing us to apply _bt_checkkeys() to at least one more tuple than necessary when looking up a unique key. However, the advantages for non-unique cases seem great enough to accept this tradeoff. Aside from simplifying and (sometimes) speeding up the indexscan code, this will allow us to reimplement btbulkdelete as a largely sequential scan instead of index-order traversal, thereby significantly reducing the cost of VACUUM. Those changes will come in a separate patch. Original patch by Heikki Linnakangas, rework by Tom Lane.
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Tweak indexscan machinery to avoid taking an AccessShareLock on an indexTom Lane2005-12-031-1/+2
| | | | | | | if we already have a stronger lock due to the index's table being the update target table of the query. Same optimization I applied earlier at the table level. There doesn't seem to be much interest in the more radical idea of not locking indexes at all, so do what we can ...
* Change seqscan logic so that we check visibility of all tuples on a pageTom Lane2005-11-261-1/+10
| | | | | | | | | | | | | | when we first read the page, rather than checking them one at a time. This allows us to take and release the buffer content lock just once per page, instead of once per tuple. Since it's a shared lock the contention penalty for holding the lock longer shouldn't be too bad. We can safely do this only when using an MVCC snapshot; else the assumption that visibility won't change over time is uncool. Therefore there are now two code paths depending on the snapshot type. I also made the same change in nodeBitmapHeapscan.c, where it can be done always because we only support MVCC snapshots for bitmap scans anyway. Also make some incidental cleanups in the APIs of these functions. Per a suggestion from Qingqing Zhou.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-4/+4
|
* Remove an unused typedef.Alvaro Herrera2005-10-071-9/+1
|
* Arrange to cache fmgr lookup information for an index's access methodTom Lane2005-05-271-7/+4
| | | | | | | | | | | | routines in the index's relcache entry, instead of doing a fresh fmgr_info on every index access. We were already doing this for the index's opclass support functions; not sure why we didn't think to do it for the AM functions too. This supersedes the former method of caching (only) amgettuple in indexscan scan descriptors; it's an improvement because the function lookup can be amortized across multiple statements instead of being repeated for each statement. Even though lookup for builtin functions is pretty cheap, this seems to drop a percent or two off some simple benchmarks.
* First steps towards index scans with heap access decoupled from indexTom Lane2005-03-271-2/+8
| | | | | | | | | | access: define new index access method functions 'amgetmulti' that can fetch multiple TIDs per call. (The functions exist but are totally untested as yet.) Since I was modifying pg_am anyway, remove the no-longer-needed 'rel' parameter from amcostestimate functions, and also remove the vestigial amowner column that was creating useless work for Alvaro's shared-object-dependencies project. Initdb forced due to changes in pg_am.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-311-2/+2
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Update copyright to 2004.Bruce Momjian2004-08-291-2/+2
|
* Get rid of rd_nblocks field in relcache entries. Turns out this wasTom Lane2004-05-081-1/+2
| | | | | | | | | costing us lots more to maintain than it was worth. On shared tables it was of exactly zero benefit because we couldn't trust it to be up to date. On temp tables it sometimes saved an lseek, but not often enough to be worth getting excited about. And the real problem was that we forced an lseek on every relcache flush in order to update the field. So all in all it seems best to lose the complexity.
* make sure the $Id tags are converted to $PostgreSQL as well ...PostgreSQL Daemon2003-11-291-1/+1
|
* Add operator strategy and comparison-value datatype fields to ScanKey.Tom Lane2003-11-091-1/+2
| | | | | | | | | | | Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
* Update copyrights to 2003.Bruce Momjian2003-08-041-2/+2
|
* pgindent run.Bruce Momjian2003-08-041-3/+3
|
* Fix for bug #866. 7.3 contains new logic for avoiding redundant calls toTom Lane2003-01-081-1/+10
| | | | | | the index AM when we know we are fetching a unique row. However, this logic did not consider the possibility that it would be asked to fetch backwards. Also fix mark/restore to work correctly in this scenario.
* pgindent run.Bruce Momjian2002-09-041-5/+5
|
* Update copyright to 2002.Bruce Momjian2002-06-201-2/+2
|
* Mark index entries "killed" when they are no longer visible to anyTom Lane2002-05-241-1/+9
| | | | | | | | | | | | | | | transaction, so as to avoid returning them out of the index AM. Saves repeated heap_fetch operations on frequently-updated rows. Also detect queries on unique keys (equality to all columns of a unique index), and don't bother continuing scan once we have found first match. Killing is implemented in the btree and hash AMs, but not yet in rtree or gist, because there isn't an equally convenient place to do it in those AMs (the outer amgetnext routine can't do it without re-pinning the index page). Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and index_insert to make this a little easier.
* Restructure indexscan API (index_beginscan, index_getnext) perTom Lane2002-05-201-19/+31
| | | | | | | yesterday's proposal to pghackers. Also remove unnecessary parameters to heap_beginscan, heap_rescan. I modified pg_proc.h to reflect the new numbers of parameters for the AM interface routines, but did not force an initdb because nothing actually looks at those fields.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-051-2/+2
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-281-1/+2
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-5/+4
| | | | tests pass.
* Statistical system views (yet without the config stuff, butJan Wieck2001-06-221-1/+5
| | | | | | | it's hard to keep such massive changes in sync with the tree so I need to get it in and work from there now). Jan
* Remove RelationGetBufferWithBuffer(), which is horribly confused aboutTom Lane2001-06-091-23/+16
| | | | | | | | | appropriate pin-count manipulation, and instead use ReleaseAndReadBuffer. Make use of the fact that the passed-in buffer (if there is one) must be pinned to avoid grabbing the bufmgr spinlock when we are able to return this same buffer. Eliminate unnecessary 'previous tuple' and 'next tuple' fields of HeapScanDesc and IndexScanDesc, thereby removing a whole lot of bookkeeping from heap_getnext() and related routines.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-241-2/+2
|
* Cache fmgr lookup data for index's getnext() function in IndexScanDesc,Tom Lane2000-03-141-1/+2
| | | | | so that the fmgr lookup only has to happen once per index scan and not once per tuple. Seems to save 5% or so of CPU time for an indexscan.
* Add:Bruce Momjian2000-01-261-2/+3
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-151-2/+2
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-151-4/+1
|
* pgindent run over code.Bruce Momjian1999-05-251-27/+27
|
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-131-4/+4
|
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-271-25/+25
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-2/+2
|
* Use Snapshot in heap access methods.Vadim B. Mikheev1998-07-271-2/+3
|
* Remove tqual.h includes not needed.Bruce Momjian1997-11-241-2/+2
|
* 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-3/+3
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-081-24/+24
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-071-45/+47
|
* another pass through.Marc G. Fournier1996-11-041-4/+4
| | | | | | | | | Note. all include files that have been hit so far have had extraneous include files cleaned out and are reduced to...the lowest common "include file", based on 'cc -Wall -I. test.c', where test.c is: #include "postgres.h" #include "<top of branches>" (ie. top of branches this time was utils/fcache2.h)
* More include file cleanupsMarc G. Fournier1996-11-031-3/+3
|
* Major code cleanups from D'arcy (-Wall -Werror)Marc G. Fournier1996-10-231-4/+2
|
* Welp, another subdirectory cleaned out of redundant/unused #includeMarc G. Fournier1996-10-191-8/+3
| | | | files