aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
Commit message (Collapse)AuthorAge
...
* pgindent run.Bruce Momjian2003-08-04
|
* Fix longstanding error in _bt_search(): should moveright at top of loop notTom Lane2003-07-29
| | | | | | | | | bottom. Otherwise we fail to moveright when the root page was split while we were "in flight" to it. This is not a significant problem when the root is above the leaf level, but if the root was also a leaf (ie, a single-page index just got split) we may return the wrong leaf page to the caller, resulting in failure to find a key that is in fact present. Bug has existed at least since 7.1, probably forever.
* A visit from the message-style police ...Tom Lane2003-07-28
|
* Error message editing in backend/access.Tom Lane2003-07-21
|
* Error message editing: finish up undone task of reporting the problemTom Lane2003-07-19
| | | | xid when we fail to access pg_clog.
* Repair boundary-case bug introduced by patch of two months ago thatTom Lane2003-07-17
| | | | | | | | fixed incorrect initial setting of StartUpID. The logic in XLogWrite() expects that Write->curridx is advanced to the next page as soon as LogwrtResult points to the end of the current page, but StartupXLOG() failed to make that happen when the old WAL ended exactly on a page boundary. Per trouble report from Hannu Krosing.
* Add comment pointing out that XLByteToPrevSeg macro is not broken.Tom Lane2003-06-26
|
* Revise hash join and hash aggregation code to use the same datatype-Tom Lane2003-06-22
| | | | | | | | specific hash functions used by hash indexes, rather than the old not-datatype-aware ComputeHashFunc routine. This makes it safe to do hash joining on several datatypes that previously couldn't use hashing. The sets of datatypes that are hash indexable and hash joinable are now exactly the same, whereas before each had some that weren't in the other.
* Replace cryptic 'Unknown kind of return type' messages with somethingTom Lane2003-06-15
| | | | hopefully a little more useful.
* This patch extracts page buffer pooling and the simpleBruce Momjian2003-06-11
| | | | | | | | | | | | | | | | | least-recently-used strategy from clog.c into slru.c. It doesn't change any visible behaviour and passes all regression tests plus a TruncateCLOG test done manually. Apart from refactoring I made a little change to SlruRecentlyUsed, formerly ClogRecentlyUsed: It now skips incrementing lru_counts, if slotno is already the LRU slot, thus saving a few CPU cycles. To make this work, lru_counts are initialised to 1 in SimpleLruInit. SimpleLru will be used by pg_subtrans (part of the nested transactions project), so the main purpose of this patch is to avoid future code duplication. Manfred Koizar
* Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian2003-05-27
| | | | | docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
* Make sure printtup() always sends the number of columns previouslyTom Lane2003-05-26
| | | | | | | | advertised in RowDescription message. Depending on the physical tuple's column count is not really correct, since according to heap_getattr() conventions the tuple may be short some columns, which will automatically get read as nulls. Problem has been latent since forever, but was only exposed by recent change to skip a projection step in SELECT * FROM...
* Repair sometimes-incorrect computation of StartUpID after a crash, perTom Lane2003-05-22
| | | | | | | example from Rao Kumar. This is a very corner corner-case, requiring a minimum of three closely-spaced database crashes and an unlucky positioning of the second recovery's checkpoint record before you'd notice any problem. But the consequences are dire enough that it's a must-fix.
* Indexing support for pattern matching operations via separate operatorPeter Eisentraut2003-05-15
| | | | class when lc_collate is not C.
* Backend support for autocommit removed, per recent discussions. TheTom Lane2003-05-14
| | | | | | only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
* In RowDescription messages, report columns of domain datatypes as havingTom Lane2003-05-13
| | | | | | the type OID and typmod of the underlying base type. Per discussions a few weeks ago with Andreas Pflug and others. Note that this behavioral change affects both old- and new-protocol clients.
* Add binary I/O routines for a bunch more datatypes. Still a few to go,Tom Lane2003-05-12
| | | | | but that was enough tedium for one day. Along the way, move the few support routines for types xid and cid into a more logical place.
* Adjust CreateCheckpoint so that buffer dumping activities and cleanup ofTom Lane2003-05-10
| | | | | | dead xlog segments are not considered part of a critical section. It is not necessary to force a database-wide panic if we get a failure in these operations. Per recent trouble reports.
* Implement new-protocol binary I/O support in DataRow, Bind, and FunctionCallTom Lane2003-05-09
| | | | | messages. Binary I/O is now up and working, but only for a small set of datatypes (integers, text, bytea).
* Update 3.0 protocol support to match recent agreements about how toTom Lane2003-05-08
| | | | | | | handle multiple 'formats' for data I/O. Restructure CommandDest and DestReceiver stuff one more time (it's finally starting to look a bit clean though). Code now matches latest 3.0 protocol document as far as message formats go --- but there is no support for binary I/O yet.
* Restructure command destination handling so that we pass aroundTom Lane2003-05-06
| | | | | | | | | | | | | | DestReceiver pointers instead of just CommandDest values. The DestReceiver is made at the point where the destination is selected, rather than deep inside the executor. This cleans up the original kluge implementation of tstoreReceiver.c, and makes it easy to support retrieving results from utility statements inside portals. Thus, you can now do fun things like Bind and Execute a FETCH or EXPLAIN command, and it'll all work as expected (e.g., you can Describe the portal, or use Execute's count parameter to suspend the output partway through). Implementation involves stuffing the utility command's output into a Tuplestore, which would be kind of annoying for huge output sets, but should be quite acceptable for typical uses of utility commands.
* Implement feature of new FE/BE protocol whereby RowDescription identifiesTom Lane2003-05-06
| | | | | | | | | the column by table OID and column number, if it's a simple column reference. Along the way, get rid of reskey/reskeyop fields in Resdoms. Turns out that representation was not convenient for either the planner or the executor; we can make the planner deliver exactly what the executor wants with no more effort. initdb forced due to change in stored rule representation.
* Extended query protocol: parse, bind, execute, describe FE/BE messages.Tom Lane2003-05-05
| | | | Only lightly tested as yet, since libpq doesn't know anything about 'em.
* Handle clog structure in shared memory in exec() case, for Win32.Bruce Momjian2003-05-03
|
* Back out last commit --- wrong patch.Bruce Momjian2003-05-02
|
* Dump/read non-default GUC values for use by exec'ed backends, for Win32.Bruce Momjian2003-05-02
|
* Portal and memory management infrastructure for extended query protocol.Tom Lane2003-05-02
| | | | | | | | | Both plannable queries and utility commands are now always executed within Portals, which have been revamped so that they can handle the load (they used to be good only for single SELECT queries). Restructure code to push command-completion-tag selection logic out of postgres.c, so that it won't have to be duplicated between simple and extended queries. initdb forced due to addition of a field to Query nodes.
* Add transaction status field to ReadyForQuery messages, and make roomTom Lane2003-04-26
| | | | | | for tableID/columnID in RowDescription. (The latter isn't really implemented yet though --- the backend always sends zeroes, and libpq just throws away the data.)
* In the continuing saga of FE/BE protocol revisions, add reporting ofTom Lane2003-04-25
| | | | | | | | | | | | | initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.)
* Another round of protocol changes. Backend-to-frontend messages now allTom Lane2003-04-22
| | | | | | | | | | have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery.
* Make Win32 tests to match existing Cygwin tests, where appropriate.Bruce Momjian2003-04-18
|
* Reorganize clog's error reporting so that PANIC on clog I/O error canTom Lane2003-04-14
| | | | | be reduced to a plain ERROR. Should make it at least a little less painful to deal with data-corruption problems.
* This patch implements holdable cursors, following the proposalBruce Momjian2003-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (materialization into a tuple store) discussed on pgsql-hackers earlier. I've updated the documentation and the regression tests. Notes on the implementation: - I needed to change the tuple store API slightly -- it assumes that it won't be used to hold data across transaction boundaries, so the temp files that it uses for on-disk storage are automatically reclaimed at end-of-transaction. I added a flag to tuplestore_begin_heap() to control this behavior. Is changing the tuple store API in this fashion OK? - in order to store executor results in a tuple store, I added a new CommandDest. This works well for the most part, with one exception: the current DestFunction API doesn't provide enough information to allow the Executor to store results into an arbitrary tuple store (where the particular tuple store to use is chosen by the call site of ExecutorRun). To workaround this, I've temporarily hacked up a solution that works, but is not ideal: since the receiveTuple DestFunction is passed the portal name, we can use that to lookup the Portal data structure for the cursor and then use that to get at the tuple store the Portal is using. This unnecessarily ties the Portal code with the tupleReceiver code, but it works... The proper fix for this is probably to change the DestFunction API -- Tom suggested passing the full QueryDesc to the receiveTuple function. In that case, callers of ExecutorRun could "subclass" QueryDesc to add any additional fields that their particular CommandDest needed to get access to. This approach would work, but I'd like to think about it for a little bit longer before deciding which route to go. In the mean time, the code works fine, so I don't think a fix is urgent. - (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and adjusted the behavior of SCROLL in accordance with the discussion on -hackers. - (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml Neil Conway
* Modify keys_are_unique optimization to release buffer pins before itTom Lane2003-03-24
| | | | | returns NULL. This avoids out-of-buffers failures during many-way indexscans, as in Shraibman's complaint of 21-Mar.
* Adjust amrescan code so that it's allowed to call index_rescan with aTom Lane2003-03-23
| | | | | | NULL key pointer, indicating that the existing scan key should be reused. This behavior isn't used yet but will be needed for my planned fix to the keys_are_unique code.
* Allow error query to start transaction in autocommit off mode.Bruce Momjian2003-03-21
|
* Remove unneeded dash blocks around function start comments.Bruce Momjian2003-03-14
|
* This patch fixes a bunch of spelling mistakes in comments throughout theTom Lane2003-03-10
| | | | | | PostgreSQL source code. Neil Conway
* Reimplement free-space-map management as per recent discussions.Tom Lane2003-03-04
| | | | | | | | | | | | Adjustable threshold is gone in favor of keeping track of total requested page storage and doling out proportional fractions to each relation (with a minimum amount per relation, and some quantization of the results to avoid thrashing with small changes in page counts). Provide special- case code for indexes so as not to waste space storing useless page free space counts. Restructure internal data storage to be a flat array instead of list-of-chunks; this may cost a little more work in data copying when reorganizing, but allows binary search to be used during lookup_fsm_page_entry().
* During VACUUM FULL, truncate off any deletable pages that are at theTom Lane2003-02-24
| | | | | | end of a btree index. This isn't super-effective, since we won't move nondeletable pages, but it's better than nothing. Also, improve stats displayed during VACUUM VERBOSE.
* Remove no-longer-used FixBTree GUC variable.Tom Lane2003-02-23
|
* btree page recycling can be done as soon as page's next-xact label isTom Lane2003-02-23
| | | | | older than current Xmin; we don't have to wait till it's older than GlobalXmin.
* Adjust btbulkdelete logic so that only one WAL record is issued whileTom Lane2003-02-23
| | | | | | deleting multiple index entries on a single index page. This makes for a very substantial reduction in the amount of WAL traffic during a large delete operation.
* Improve coding of log_heap_clean() and heap_xlog_clean().Tom Lane2003-02-23
|
* First cut at recycling space in btree indexes. Still some rough edgesTom Lane2003-02-23
| | | | to fix, but it seems to basically work...
* More infrastructure for btree compaction project. Tree-traversal codeTom Lane2003-02-22
| | | | | | | | now knows what to do upon hitting a dead page (in theory anyway, it's untested...). Add a post-VACUUM-cleanup entry point for index AMs, to provide a place for dead-page scavenging to happen. Also, fix oversight that broke btpo_prev links in temporary indexes. initdb forced due to additions in pg_am.
* Make btree index structure adjustments and WAL logging changes needed toTom Lane2003-02-21
| | | | | | | | | | | support btree compaction, as per proposal of a few days ago. btree index pages no longer store parent links, instead they have a level indicator (counting up from zero for leaf pages). The FixBTree recovery logic is removed, and replaced by code that detects missing parent-level insertions during WAL replay. Also, generate appropriate WAL entries when updating btree metapage and when building a btree index from scratch. I believe btree indexes are now completely WAL-legal for the first time. initdb forced due to index and WAL changes.
* This trivial patch removes the usage of some old statistics code that noBruce Momjian2003-02-13
| | | | | | | | | longer works -- IncrHeapAccessStat() didn't actually *do* anything anymore, so no reason to keep it around AFAICS. I also fixed a grammatical error in a comment. Neil Conway
* Use stat(2) to probe for existing xlog segments in InstallXLogFileSegment,Tom Lane2003-01-25
| | | | | | | | | rather than actually opening the files. This eliminates some corner cases where the file indeed exists but open() fails for another reason, such as being out of file descriptors. The net reliability gain is probably tiny, since xlog.c is full of other file open calls that will elog(PANIC) if they fail for any reason; but this specific failure mode has been observed in the field, so we may as well fix it.
* Read-only transactions, as defined in SQL.Peter Eisentraut2003-01-10
|