aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
Commit message (Collapse)AuthorAge
* Add some code to CREATE DATABASE to check for pre-existing subdirectoriesTom Lane2006-10-18
| | | | | | that conflict with the OID that we want to use for the new database. This avoids the risk of trying to remove files that maybe we shouldn't remove. Per gripe from Jon Lapham and subsequent discussion of 27-Sep.
* Message style improvementsPeter Eisentraut2006-10-06
|
* Cleanup for pglz_compress code: remove dead code, const-ify API ofTom Lane2006-10-05
| | | | | | remaining functions, simplify pglz_compress's API to not require a useless data copy when compression fails. Also add a check in pglz_decompress that the expected amount of data was decompressed.
* Make use of qsort_arg in several places that were formerly using klugyTom Lane2006-10-05
| | | | | | static variables. This avoids any risk of potential non-reentrancy, and in particular offers a much cleaner workaround for the Intel compiler bug that was affecting ginutil.c.
* pgindent run for 8.2.Bruce Momjian2006-10-04
|
* Make some sentences consistent with similar ones.Bruce Momjian2006-10-03
| | | | Euler Taveira de Oliveira
* Degrade the transaction-id wraparound point message from LOG to DEBUG1, perAlvaro Herrera2006-09-26
| | | | | | discussion. Patch from Simon Riggs.
* Fix free space map to correctly track the total amount of FSM space neededTom Lane2006-09-21
| | | | | | | even when a single relation requires more than max_fsm_pages pages. Also, make VACUUM emit a warning in this case, since it likely means that VACUUM FULL or other drastic corrective measure is needed. Per reports from Jeff Frost and others of unexpected changes in the claimed max_fsm_pages need.
* Improve error message. Per discussionTeodor Sigaev2006-09-14
| | | | http://archives.postgresql.org/pgsql-general/2006-09/msg00186.php
* Remove unnecessary brace pair.Bruce Momjian2006-09-10
|
* If we're going to advertise the array overlap/containment operators,Tom Lane2006-09-10
| | | | | | we probably should make them work reliably for all arrays. Fix code to handle NULLs and multidimensional arrays, move it into arrayfuncs.c. GIN is still restricted to indexing arrays with no null elements, however.
* Rename contains/contained-by operators to @> and <@, per discussion thatTom Lane2006-09-10
| | | | | | | | agreed these symbols are less easily confused. I made new pg_operator entries (with new OIDs) for the old names, so as to provide backward compatibility while making it pretty easy to remove the old names in some future release cycle. This commit only touches the core datatypes, contrib will be fixed separately.
* Fix Intel compiler bug. Per discussionTeodor Sigaev2006-09-05
| | | | | 'GIN FailedAssertions on Itanium2 with Intel compiler' in pgsql-hackers, http://archives.postgresql.org/pgsql-hackers/2006-08/msg01914.php
* Arrange for GetSnapshotData to copy live-subtransaction XIDs from theTom Lane2006-09-03
| | | | | | | | | | PGPROC array into snapshots, and use this information to avoid visits to pg_subtrans in HeapTupleSatisfiesSnapshot. This appears to solve the pg_subtrans-related context swap storm problem that's been reported by several people for 8.1. While at it, modify GetSnapshotData to not take an exclusive lock on ProcArrayLock, as closer analysis shows that shared lock is always sufficient. Itagaki Takahiro and Tom Lane
* Fix BUG #2594: Gin Indexes cause server to crash when it builds on empty tableTeodor Sigaev2006-08-29
|
* Move xact.c's partial support for Lists of TransactionIds into pg_list.h.Tom Lane2006-08-27
| | | | Needed because lock.c is now going to use the same type of list.
* Add the ability to create indexes 'concurrently', that is, withoutTom Lane2006-08-25
| | | | | blocking concurrent writes to the table. Greg Stark, with a little help from Tom Lane.
* Optimize the case where a btree indexscan has current and mark positionsTom Lane2006-08-24
| | | | | | | | on the same index page; we can avoid data copying as well as buffer refcount manipulations in this common case. Makes for a small but noticeable improvement in mergejoin speed. Heikki Linnakangas
* Make the server track an 'XID epoch', that is, maintain higher-order bitsTom Lane2006-08-21
| | | | | | | | | of the transaction ID counter. Nothing is done with the epoch except to store it in checkpoint records, but this provides a foundation with which add-on code can pretend that XIDs never wrap around. This is a severely trimmed and rewritten version of the xxid patch submitted by Marko Kreen. Per discussion, the epoch counter seems the only part of xxid that really needs to be in the core server.
* Now that we've rearranged relation open to get a lock before touchingTom Lane2006-08-18
| | | | | | the rel, it's easy to get rid of the narrow race-condition window that used to exist in VACUUM and CLUSTER. Did some minor code-beautification work in the same area, too.
* Implement archive_timeout feature to force xlog file switches to occur no moreTom Lane2006-08-17
| | | | | | | | | | | than N seconds apart. This allows a simple, if not very high performance, means of guaranteeing that a PITR archive is no more than N seconds behind real time. Also make pg_current_xlog_location return the WAL Write pointer, add pg_current_xlog_insert_location to return the Insert pointer, and fix pg_xlogfile_name_offset to return its results as a two-element record instead of a smashed-together string, as per recent discussion. Simon Riggs
* Add INSERT/UPDATE/DELETE RETURNING, with basic docs and regression tests.Tom Lane2006-08-12
| | | | | | | | plpgsql support to come later. Along the way, convert execMain's SELECT INTO support into a DestReceiver, in order to eliminate some ugly special cases. Jonah Harris and Tom Lane
* Make recovery from WAL be restartable, by executing a checkpoint-likeTom Lane2006-08-07
| | | | | | | | | | operation every so often. This improves the usefulness of PITR log shipping for hot standby: formerly, if the standby server crashed, it was necessary to restart it from the last base backup and replay all the WAL since then. Now it will only need to reread about the same amount of WAL as the master server would. The behavior might also come in handy during a long PITR replay sequence. Simon Riggs, with some editorialization by Tom Lane.
* Add support for forcing a switch to a new xlog file; cause such a switchTom Lane2006-08-06
| | | | | | | to happen automatically during pg_stop_backup(). Add some functions for interrogating the current xlog insertion point and for easily extracting WAL filenames from the hex WAL locations displayed by pg_stop_backup and friends. Simon Riggs with some editorialization by Tom Lane.
* Add missing pgstat_count_index_scan(), per Andreas Seltenreich.Tom Lane2006-08-03
|
* Change the relation_open protocol so that we obtain lock on a relationTom Lane2006-07-31
| | | | | | | | | | | | (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.
* Modify snapshot definition so that lazy vacuums are ignored by otherAlvaro Herrera2006-07-30
| | | | | | | | | vacuums. This allows a OLTP-like system with big tables to continue regular vacuuming on small-but-frequently-updated tables while the big tables are being vacuumed. Original patch from Hannu Krossing, rewritten by Tom Lane and updated by me.
* Modify btree to delete known-dead index entries without an actual VACUUM.Tom Lane2006-07-25
| | | | | | | | | | When we are about to split an index page to do an insertion, first look to see if any entries marked LP_DELETE exist on the page, and if so remove them to try to make enough space for the desired insert. This should reduce index bloat in heavily-updated tables, although of course you still need VACUUM eventually to clean up the heap. Junji Teramoto
* DTrace support, with a small initial set of probesPeter Eisentraut2006-07-24
| | | | by Robert Lor
* Don't try to truncate multixact SLRU files in checkpoints done during xlogTom Lane2006-07-20
| | | | | | | | | | | recovery. In the first place, it doesn't work because slru's latest_page_number isn't set up yet (this is why we've been hearing reports of strange "apparent wraparound" log messages during crash recovery, but only from people who'd managed to advance their next-mxact counters some considerable distance from 0). In the second place, it seems a bit unwise to be throwing away data during crash recovery anwyway. This latter consideration convinces me to just disable truncation during recovery, rather than computing latest_page_number and pushing ahead.
* Fix getDatumCopy(): don't use store_att_byval to copy into a DatumTom Lane2006-07-16
| | | | | | variable (this accounts for regression failures on PPC64, and in fact won't work on any big-endian machine). Get rid of hardwired knowledge about datum size rules; make it look just like datumCopy().
* Improve error message wording.Tom Lane2006-07-16
|
* Fix misguided removal of access/tuptoaster.h inclusion, per Kris Jurka.Tom Lane2006-07-14
| | | | | | I'm going to insist on reversion of this entire patch unless pgrminclude is upgraded to a less broken state, but in the meantime let's get contrib passing regression again.
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-14
|
* Allow include files to compile own their own.Bruce Momjian2006-07-13
| | | | | | | 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.
* Tweak fillfactor code as per my recent proposal. Fix nbtsort.c so thatTom Lane2006-07-11
| | | | | | it can handle small fillfactors for ordinary-sized index entries without failing on large ones; fix nbtinsert.c to distinguish leaf and nonleaf pages; change the minimum fillfactor to 10% for all index types.
* Add support to GIN for =(anyarray,anyarray) operationTeodor Sigaev2006-07-11
|
* Alphabetically order reference to include files, "S"-"Z".Bruce Momjian2006-07-11
|
* Alphabetically order reference to include files, "N" - "S".Bruce Momjian2006-07-11
|
* Alphabetically order reference to include files, "G" - "M".Bruce Momjian2006-07-11
|
* GIN improvementsTeodor Sigaev2006-07-11
| | | | | | | | - Replace sorted array of entries in maintenance_work_mem to binary tree, this should improve create performance. - More precisely calculate allocated memory, eliminate leaks with user-defined extractValue() - Improve wordings in tsearch2
* Improve vacuum code to track minimum Xids per table instead of per database.Alvaro Herrera2006-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | To this end, add a couple of columns to pg_class, relminxid and relvacuumxid, based on which we calculate the pg_database columns after each vacuum. We now force all databases to be vacuumed, even template ones. A backend noticing too old a database (meaning pg_database.datminxid is in danger of falling behind Xid wraparound) will signal the postmaster, which in turn will start an autovacuum iteration to process the offending database. In principle this is only there to cope with frozen (non-connectable) databases without forcing users to set them to connectable, but it could force regular user database to go through a database-wide vacuum at any time. Maybe we should warn users about this somehow. Of course the real solution will be to use autovacuum all the time ;-) There are some additional improvements we could have in this area: for example the vacuum code could be smarter about not updating pg_database for each table when called by autovacuum, and do it only once the whole autovacuum iteration is done. I updated the system catalogs documentation, but I didn't modify the maintenance section. Also having some regression tests for this would be nice but it's not really a very straightforward thing to do. Catalog version bumped due to system catalog changes.
* Code review for FILLFACTOR patch. Change WITH grammar as per earlierTom Lane2006-07-03
| | | | | | | | | | | | | | | | discussion (including making def_arg allow reserved words), add missed opt_definition for UNIQUE case. Put the reloptions support code in a less random place (I chose to make a new file access/common/reloptions.c). Eliminate header inclusion creep. Make the index options functions safely user-callable (seems like client apps might like to be able to test validity of options before trying to make an index). Reduce overhead for normal case with no options by allowing rd_options to be NULL. Fix some unmaintainably klugy code, including getting rid of Natts_pg_class_fixed at long last. Some stylistic cleanup too, and pay attention to keeping comments in sync with code. Documentation still needs work, though I did fix the omissions in catalogs.sgml and indexam.sgml.
* Add FILLFACTOR to CREATE INDEX.Bruce Momjian2006-07-02
| | | | ITAGAKI Takahiro
* Forget to add new file :((Teodor Sigaev2006-06-28
|
* ChangesTeodor Sigaev2006-06-28
| | | | | | | | | | | | | | | | | | | | * new split algorithm (as proposed in http://archives.postgresql.org/pgsql-hackers/2006-06/msg00254.php) * possible call pickSplit() for second and below columns * add spl_(l|r)datum_exists to GIST_SPLITVEC - pickSplit should check its values to use already defined spl_(l|r)datum for splitting. pickSplit should set spl_(l|r)datum_exists to 'false' (if they was 'true') to signal to caller about using spl_(l|r)datum. * support for old pickSplit(): not very optimal but correct split * remove 'bytes' field from GISTENTRY: in any case size of value is defined by it's type. * split GIST_SPLITVEC to two structures: one for using in picksplit and second - for internal use. * some code refactoring * support of subsplit to rtree opclasses TODO: add support of subsplit to contrib modules
* Put #ifdef NOT_USED around posix_fadvise call. We may want to resurrectTom Lane2006-06-27
| | | | | | this someday, but right now it seems that posix_fadvise is immature to the point of being broken on many platforms ... and we don't have any benchmark evidence proving it's worth spending time on.
* Extend the MinimalTuple concept to tuplesort.c, thereby reducing theTom Lane2006-06-27
| | | | | | | | | per-tuple space overhead for sorts in memory. I chose to replace the previous patch that tried to write out the bare minimum amount of data when sorting on disk; instead, just dump the MinimalTuples as-is. This wastes 3 to 10 bytes per tuple depending on architecture and null-bitmap length, but the simplification in the writetup/readtup routines seems worth it.
* Create infrastructure for 'MinimalTuple' representation of in-memoryTom Lane2006-06-27
| | | | | | | | tuples with less header overhead than a regular HeapTuple, per my recent proposal. Teach TupleTableSlot code how to deal with these. As proof of concept, change tuplestore.c to store MinimalTuples instead of HeapTuples. Future patches will expand the concept to other places where it is useful.
* pg_stop_backup was calling XLogArchiveNotify() twice for the newly createdTom Lane2006-06-22
| | | | | backup history file. Bug introduced by the 8.1 change to make pg_stop_backup delete older history files. Per report from Masao Fujii.