aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Fix mergejoin cost estimation so that we consider the statistical ranges ofTom Lane2007-12-08
| | | | | | | | | | the two join variables at both ends: not only trailing rows that need not be scanned because there cannot be a match on the other side, but initial rows that will be scanned without possibly having a match. This allows a more realistic estimate of startup cost to be made, per recent pgsql-performance discussion. In passing, fix a couple of bugs that had crept into mergejoinscansel: it was not quite up to speed for the task of estimating descending-order scans, which is a new requirement in 8.3.
* Realign the running text in this file to 79 characters wide. Some otherPeter Eisentraut2007-12-07
| | | | copy-editing.
* Change wording of logged message when cancelling an autovacuum task, usingAlvaro Herrera2007-12-06
| | | | | american speling (unlike this commit message). Per complaint from Mike C. on bug #3790 and subsequent discussion.
* Fix build_minmax_path() to cope if an IS NULL clause turns up in theTom Lane2007-12-03
| | | | | | indexable-clauses list for a btree index. Formerly it just Asserted that all such clauses were opclauses, but that's no longer true in 8.3. Per bug #3796 from Matthias Schoeneich.
* Revert COPY OUT to follow the pre-8.3 handling of ASCII control characters,Tom Lane2007-12-03
| | | | | | | | | | namely that \r, \n, \t, \b, \f, \v are dumped as those two-character representations rather than a backslash and the literal control character. I had made it do the other to save some code, but this was ill-advised, because dump files in which these characters appear literally are prone to newline mangling. Fortunately, doing it the old way should only cost a few more lines of code, and not slow down the copy loop materially. Per bug #3795 from Lou Duchez.
* Code review for LIKE ... INCLUDING INDEXES patch. Fix failure to propagateTom Lane2007-12-01
| | | | | | | | | | constraint status of copied indexes (bug #3774), as well as various other small bugs such as failure to pstrdup when needed. Allow INCLUDING INDEXES indexes to be merged with identical declared indexes (perhaps not real useful, but the code is there and having it not apply to LIKE indexes seems pretty unorthogonal). Avoid useless work in generateClonedIndexStmt(). Undo some poorly chosen API changes, and put a couple of routines in modules that seem to be better places for them.
* Avoid incrementing the CommandCounter when CommandCounterIncrement is calledTom Lane2007-11-30
| | | | | | | | | | | | | | | | | | | | but no database changes have been made since the last CommandCounterIncrement. This should result in a significant improvement in the number of "commands" that can typically be performed within a transaction before hitting the 2^32 CommandId size limit. In particular this buys back (and more) the possible adverse consequences of my previous patch to fix plan caching behavior. The implementation requires tracking whether the current CommandCounter value has been "used" to mark any tuples. CommandCounter values stored into snapshots are presumed not to be used for this purpose. This requires some small executor changes, since the executor used to conflate the curcid of the snapshot it was using with the command ID to mark output tuples with. Separating these concepts allows some small simplifications in executor APIs. Something for the TODO list: look into having CommandCounterIncrement not do AcceptInvalidationMessages. It seems fairly bogus to be doing it there, but exactly where to do it instead isn't clear, and I'm disinclined to mess with asynchronous behavior during late beta.
* Repair bug that allowed RevalidateCachedPlan to attempt to rebuild a cachedTom Lane2007-11-30
| | | | | | | | | | plan before the effects of DDL executed in an immediately prior SPI operation had been absorbed. Per report from Chris Wood. This patch has an unpleasant side effect of causing the number of CommandCounterIncrement()s done by a typical plpgsql function to approximately double. Amelioration of the consequences of that will be undertaken in a separate patch.
* Translation updatesPeter Eisentraut2007-11-29
|
* Make a cleanup pass over error reports in tsearch code. Use ereportTom Lane2007-11-28
| | | | | for user-facing errors, fix some poor choices of errcode, adhere to message style guide.
* Improve test coverage of CLOBBER_CACHE_ALWAYS by having it also forceTom Lane2007-11-28
| | | | | | | | reloading of operator class information on each use of LookupOpclassInfo. Had this been in place a year ago, it would have helped me find a bug in the then-new 'operator family' code. Now that we have a build farm member testing CLOBBER_CACHE_ALWAYS on a regular basis, it seems worth expending a little bit of effort here.
* Adjust the names of a couple of tsearch index support functions that hadTom Lane2007-11-28
| | | | | | | inappropriately generic-sounding names. This is more or less free since we already forced initdb for the next beta, and it may prevent confusion or name conflicts (particularly at the C-global-symbol level) down the road. Per my proposal yesterday.
* Install a lookaside cache to speed up repeated lookups of the same operatorTom Lane2007-11-28
| | | | | | | | | by short-circuiting schema search path and ambiguous-operator resolution computations. Remarkably, this buys as much as 45% speedup of repetitive simple queries that involve operators that are not an exact match to the input datatypes. It should be marginally faster even for exact-match cases, though I've not had success in proving an improvement in benchmark tests. Per report from Guillame Smet and subsequent discussion.
* Proper capitalization of IspellPeter Eisentraut2007-11-28
|
* Fix XML Schema structure for char types without length (bug #3782)Peter Eisentraut2007-11-28
|
* Improve terminologyPeter Eisentraut2007-11-28
|
* Fix typoPeter Eisentraut2007-11-28
|
* Change a stop word on the right-hand-side in the thesaurus file to be anBruce Momjian2007-11-28
| | | | ERROR, not NOTICE.
* Suppress compiler warning.Tom Lane2007-11-27
|
* Make casts from xml to text independent of the XML option setting, thusPeter Eisentraut2007-11-27
| | | | | immutable and indexable. Also fix the volatility settings of some other XML-related functions.
* correct capitalizationPeter Eisentraut2007-11-27
|
* Fix select_common_type() so that it can select a domain type, if all inputsTom Lane2007-11-26
| | | | | | | | | | | | | | | | to a UNION, CASE, or related construct are of the same domain type. The main part of this routine smashes domains to their base types, which seems necessary because the logic involves TypeCategory() and IsPreferredType(), neither of which work usefully on domains. However, we can add a first pass that just detects whether all the inputs are exactly the same type, and if so accept that without question (so long as it's not UNKNOWN). Per recent gripe from Dean Rasheed. In passing, remove some tests for InvalidOid, which have clearly been dead code for quite some time now, because getBaseType() would fail on that input. Also, clarify the manual's not-very-precise description of the existing algorithm's behavior.
* Allow for X as well as x to be the prefix for hexadecimal character ref ↵Andrew Dunstan2007-11-25
| | | | | | entity numbers, as in HTML.
* Fix XML tag namespace change inadvertantly missed from previous fix. AddAndrew Dunstan2007-11-25
| | | | regression test for XML names and numeric entities.
* Use double quotes for quoting xml attributes.Peter Eisentraut2007-11-25
|
* Fix thinko in comment.Tom Lane2007-11-25
|
* Reduce routine successful-archiving message from LOG to DEBUG1 grade,Tom Lane2007-11-24
| | | | | to reduce chattiness of logs. Per discussion. Simon Riggs
* Fix (I think) broken usage of MultiByteToWideChar. I had missed theTom Lane2007-11-24
| | | | | | subtlety that this function only returns a null terminator if it's fed input that includes one; which, in the usage here, it's not. This probably fixes bugs reported by Thomas Haegi.
* Slightly more paranoia and slightly better comments for use ofTom Lane2007-11-24
| | | | Windows-specific MultiByteToWideChar/WideCharToMultiByte calls.
* Save another little bit of planner overhead on simple queries, by havingTom Lane2007-11-24
| | | | | | | | clauselist_selectivity skip some analysis that's useless when there's only one clause in the given list. Actually this can win even for not-so-simple queries, because we also apply clauselist_selectivity to sublists such as the quals matching an index; which are likely to have only a single entry even when the total query is quite complicated.
* Clarify how MONEY trims off trailing thousands separator.Bruce Momjian2007-11-24
|
* Make the MONEY data type have a thousands separator != decimal symbol,Bruce Momjian2007-11-24
| | | | | | if the locale has the thousands separator as "". This now matches the to_char and psql numericlocale behavior. (Previously this data type was basically useless for such setups.)
* Change fix_scan_expr() to avoid copying the input node tree in the common caseTom Lane2007-11-24
| | | | | | | | where rtoffset == 0. In that case there is no need to change Var nodes, and since filling in unset opfuncid fields is always safe, scribbling on the input tree to that extent is not objectionable. This brings the cost of this operation back down to what it was in 8.2 for simple queries. Per investigation of performance gripe from Guillaume Smet.
* Avoid uselessly building a duplicate of the original clause in trivial casesTom Lane2007-11-23
| | | | | | | | | | | | | | | | where the EquivalenceClass machinery is unable to deduce anything more from a simple "var = const" qual clause. There are probably some more cases where this could be done, but this seems to take care of most of the added overhead for simple queries. Per gripe from Guillaume Smet. In passing, fix a problem that was exposed by this change: reconsider_outer_join_clause and friends were passing the wrong relids to build_implied_join_equality, resulting in RestrictInfos with the wrong required_relids. This mistake was masked in typical cases since the bogus RestrictInfos would never have escaped from the EquivalenceClass machinery, but I think there might be corner cases involving "broken" ECs where there would have been a visible failure even without the new optimization. In any case the code was certainly not operating as intended.
* Fix white space in MONEY type code. Rename 'comma' to more genericBruce Momjian2007-11-23
| | | | 'ssymbol' as used in previous function.
* Actually ... it's pretty silly that parse_oper.c doesn't set up theTom Lane2007-11-22
| | | | | | | opfuncid of an OpExpr initially, considering that it has the information at hand already. We'll still treat opfuncid as a cache rather than a guaranteed-valid value, but this change saves one more syscache lookup in the normal code path.
* Save one syscache lookup when examining volatility or strictness ofTom Lane2007-11-22
| | | | | | | | OpExpr and related nodes. We're going to have to set the opfuncid of such nodes eventually (if we haven't already), so we might as well exploit the opportunity to cache the function OID. Buys back some of the extra planner overhead noted by Guillaume Smet, though I still need to fool with equivclass.c to really respond to that.
* Add more comments about thousands separator handling.Bruce Momjian2007-11-22
|
* Add comments about thousands separator logic.Bruce Momjian2007-11-22
|
* When setting default thousands separator when locale has "", use logicBruce Momjian2007-11-21
| | | | so new thousands separator doesn't match decimal symbol.
* Fix typo in comment.Bruce Momjian2007-11-21
|
* Fix bogus length calculation that could lead to crash if the stringTom Lane2007-11-20
| | | | | | happened to be right up against the end of memory, per report from Matt Magoffin. While at it, avoid useless multiple copying of string by not depending on xmlStrncatNew.
* Change descriptions of entity and tag objects to "XML entity" and "XML tag".Andrew Dunstan2007-11-20
| | | | | | Allow tag and entity names that follow XML rules. Provide for hexadecimal as well as decimal numeric entities. Adjust code names to coincide with new descriptions.
* Improve GIN index build's tracking of memory usage by usingTom Lane2007-11-16
| | | | | | | | | GetMemoryChunkSpace, not just the palloc request size. This brings the allocatedMemory counter close enough to reality (as measured by MemoryContextStats printouts) that I think we can get rid of the arbitrary factor-of-2 adjustment that was put into the code initially. Given the sensitivity of GIN build to work memory size, not using as much of work memory as we're allowed to seems a pretty bad idea.
* Repair still another bug in the btree page split WAL reduction patch:Tom Lane2007-11-16
| | | | | | | it failed for splits of non-leaf pages because in such pages the first data key on a page is suppressed, and so we can't just copy the first key from the right page to reconstitute the left page's high key. Problem found by Koichi Suzuki, patch by Heikki.
* Fix tsvectorout() and tsqueryout() to escape backslesh, add test of that.Teodor Sigaev2007-11-16
| | | | | | Patch by Bruce Momjian <bruce@momjian.us> Backpatch is needed, but it's impossible to apply it directly
* Small comment spacing improvement.Bruce Momjian2007-11-16
|
* Run pgindent on remaining files now that LOOPBYTE is a usable macro.Bruce Momjian2007-11-16
|
* Cleanup for new else/comment handling.Bruce Momjian2007-11-16
|
* Fix stupid typo in recently-added code :-(Tom Lane2007-11-16
|