aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Improve capitalization and punctuation in recently added GiST message.Peter Eisentraut2009-06-10
|
* Fix cash_in() to behave properly in locales where frac_digits is zero,Tom Lane2009-06-10
| | | | | | | eg Japan. Report and fix by Itagaki Takahiro. Also fix CASHDEBUG printout format for branches with 64-bit money type, and some minor comment cleanup. Back-patch to 7.4, because it's broken all the way back.
* Adjust recent PERL_SYS_INIT3 call to avoid platforms where it might fail, ↵Andrew Dunstan2009-06-05
| | | | and to remove compilation warning. Backpatch the release 7.4
* GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macrosTom Lane2009-06-05
| | | | | | | | | | | | should use GinItemPointerGetBlockNumber/GinItemPointerGetOffsetNumber, not ItemPointerGetBlockNumber/ItemPointerGetOffsetNumber, because the latter will Assert() on ip_posid == 0, ie a "Min" pointer. (Thus, ItemPointerIsMin has never worked at all, but it seems unused at present.) I'm not certain that the case can occur in normal functioning, but it's blowing up on me while investigating Tatsuo-san's data corruption problem. In any case it seems like a problem waiting to bite someone. Back-patch just in case this really is a problem for somebody in the field.
* Initialise perl library as documented in perl API. Backpatch to release 7.4.Andrew Dunstan2009-06-04
|
* Update relpages and reltuples estimates in stand-alone ANALYZE, even ifHeikki Linnakangas2009-05-19
| | | | | | | | there's no analyzable attributes or indexes. We also used to report 0 live and dead tuples for such tables, which messed with autovacuum threshold calculations. This fixes bug #4812 reported by George Su. Backpatch back to 8.1.
* Partially revert my patch of 2008-11-12 that installed a limit on the numberTom Lane2009-05-11
| | | | | | | | | | | of AND/OR clause branches that predtest.c would attempt to deal with. As noted in bug #4721, that change disabled proof attempts for sizes of problems that people are actually expecting it to work for. The original complaint it was trying to solve was O(N^2) behavior for long IN-lists, so let's try applying the limit to just ScalarArrayOpExprs rather than everything. Another case of "foolish consistency" I fear. Back-patch to 8.2, same as the previous patch was.
* Request XLOG switch before writing checkpoint in pg_start_backup(). OtherwiseHeikki Linnakangas2009-05-07
| | | | | | | | | | | | | | | | | | you can end up with an unrecoverable backup if you start a new base backup right after finishing archive recovery. In that scenario, the redo pointer of the checkpoint that pg_start_backup() writes points to the XLOG segment where the timeline-changing end-of-archive-recovery checkpoint is. The beginning of that segment contains pages with the old timeline ID, and we don't accept that in recovery unless we find a history file covering the old timeline ID. If you omit pg_xlog from the base backup and clear the archive directory before starting the backup, there will be no such history file available. The bug is present in all versions since PITR was introduced in 8.0, but I'm back-patching only back to 8.2. Earlier versions didn't have XLOG switch records, making this fix unfeasible. Given the lack of reports until now, it doesn't seem worthwhile to spend more effort to fix 8.0 and 8.1. Per report and suggestion by Mikael Krantz
* Call SetLastError(0) before calling the file mapping functionsMagnus Hagander2009-05-04
| | | | | | | to make sure that the error code is reset, as a precaution in case the API doesn't properly reset it on success. This could be necessary, since we check the error value even if the function doesn't fail for specific success cases.
* Fix pg_resetxlog to remove archive status files along with WAL segment files.Tom Lane2009-05-03
| | | | Fujii Masao
* Split the release notes into a separate file for each (active) major branch,Tom Lane2009-05-02
| | | | | | | | | | | | as per my recent proposal. release.sgml itself is now just a stub that should change rarely; ideally, only once per major release to add a new include line. Most editing work will occur in the release-N.N.sgml files. To update a back branch for a minor release, just copy the appropriate release-N.N.sgml file(s) into the back branch. This commit doesn't change the end-product documentation at all, only the source layout. However, it makes it easy to start omitting ancient information from newer branches' documentation, should we ever decide to do that.
* When checking for datetime field overflow, we should allow a fractional-secondTom Lane2009-05-01
| | | | | | | | | | | | | | part that rounds up to exactly 1.0 second. The previous coding rejected input like "00:12:57.9999999999999999999999999999", with the exact number of nines needed to cause failure varying depending on float-timestamp option and possibly on platform. Obviously this should round up to the next integral second, if we don't have enough precision to distinguish the value from that. Per bug #4789 from Robert Kruus. In passing, fix a missed check for fractional seconds in one copy of the "is it greater than 24:00:00" code. Broken all the way back, so patch all the way back.
* Fix the handling of sub-SELECTs appearing in the arguments of an outer-levelTom Lane2009-04-25
| | | | | | | | | | | | | | | | | aggregate function. By definition, such a sub-SELECT cannot reference any variables of query levels between itself and the aggregate's semantic level (else the aggregate would've been assigned to that lower level instead). So the correct, most efficient implementation is to treat the sub-SELECT as being a sub-select of that outer query level, not the level the aggregate syntactically appears in. Not doing so also confuses the heck out of our parameter-passing logic, as illustrated in bug report from Daniel Grace. Fortunately, we were already copying the whole Aggref expression up to the outer query level, so all that's needed is to delay SS_process_sublinks processing of the sub-SELECT until control returns to the outer level. This has been broken since we introduced spec-compliant treatment of outer aggregates in 7.4; so patch all the way back.
* Remove HELIOS Software GmbH name and copyright from AIX dynloader files,Bruce Momjian2009-04-25
| | | | | | per approval from Helmut Tschemernjak, President. Only back branches; files removed from CVS HEAD.
* Remove beer-ware license from crypt-md5.c, perMagnus Hagander2009-04-15
| | | | | | | approval from Poul-Henning Kamp. This makes the file the same standard 2-clause BSD as the rest of PostgreSQL.
* Update time zone data files to tzdata release 2009e: DST law changes inTom Lane2009-04-09
| | | | | Argentina/San_Luis, Cuba, Jordan (historical correction only), Morocco, Palestine, Syria, Tunisia.
* Fix contrib/pg_freespacemap's underestimate of the number of pages itTom Lane2009-04-07
| | | | | | could find in the FSM. Per report from Dimitri Fontaine and Andrew Gierth. (Affects only 8.2 and 8.3 since HEAD no longer has MaxFSMPages at all.)
* Defend against non-ASCII letters in fuzzystrmatch code. The functionsTom Lane2009-04-07
| | | | | still don't behave very sanely for multibyte encodings, but at least they won't be indexing off the ends of static arrays.
* Fix 'all at one page bug' in picksplit method of R-tree emulation. Add defenseTeodor Sigaev2009-04-06
| | | | from buggy user-defined picksplit to GiST.
* Rewrite interval_hash() so that the hashcodes are equal for values thatTom Lane2009-04-04
| | | | | | | | | | | | | | | interval_eq() considers equal. I'm not sure how that fundamental requirement escaped us through multiple revisions of this hash function, but there it is; it's been wrong since interval_hash was first written for PG 7.1. Per bug #4748 from Roman Kononov. Backpatch to all supported releases. This patch changes the contents of hash indexes for interval columns. That's no particular problem for PG 8.4, since we've broken on-disk compatibility of hash indexes already; but it will require a migration warning note in the next minor releases of all existing branches: "if you have any hash indexes on columns of type interval, REINDEX them after updating".
* Use (unsigned char) cast in argument of pg_tolower(). Maybe it works onTom Lane2009-04-03
| | | | | | Windows without that, but we shouldn't put bad examples where people might copy them. Also, reformat slightly to improve the odds that pgindent won't go nuts on this.
* Make directory name comparisons on Win32 case insensitive.Magnus Hagander2009-04-03
| | | | | | | | | This method will not catch all different ways since the locale handling in NTFS doesn't provide an easy way to do that, but it will hopefully solve the most common cases causing startup problems when the backend is found in the system PATH. Attempts to fix bug #4694.
* Fix memory allocation for output of hstore type.Teodor Sigaev2009-04-02
| | | | Per "maosen.zhang" <maosen.zhang@alibaba-inc.com> report.
* plpgsql's exec_simple_cast_value() mistakenly supposed that it could bypassTom Lane2009-04-02
| | | | | | | | | | | casting effort whenever the input value was NULL. However this prevents application of not-null domain constraints in the cases that use this function, as illustrated in bug #4741. Since this function isn't meant for use in performance-critical paths anyway, this certainly seems like another case of "premature optimization is the root of all evil". Back-patch as far as 8.2; older versions made no effort to enforce domain constraints here anyway.
* Fix contrib/pgstattuple and contrib/pageinspect to prevent attempts to readTom Lane2009-03-31
| | | | | | | temporary tables of other sessions; that is unsafe because of the way our buffer management works. Per report from Stuart Bishop. This is redundant with the bufmgr.c checks in HEAD, but not at all redundant in the back branches.
* Don't crash initdb when we fail to get the current username.Magnus Hagander2009-03-31
| | | | | | Give an error message and exit instead, like we do elsewhere... Per report from Wez Furlong and Robert Treat.
* Fix a rare race condition when commit_siblings > 0 and a transaction commitsHeikki Linnakangas2009-03-31
| | | | | | | | | | | at the same instant as a new backend is spawned. Since CountActiveBackends() doesn't hold ProcArrayLock, it needs to be prepared for the case that a pointer at the end of the proc array is still NULL even though numProcs says it should be valid, since it doesn't hold ProcArrayLock. Backpatch to 8.1. 8.0 and earlier had this right, but it was broken in the split of PGPROC and sinval shared memory arrays. Per report and proposal by Marko Kreen.
* Fix an oversight in the support for storing/retrieving "minimal tuples" inTom Lane2009-03-30
| | | | | | | | | | | | | | | | | | | | | TupleTableSlots. We have functions for retrieving a minimal tuple from a slot after storing a regular tuple in it, or vice versa; but these were implemented by converting the internal storage from one format to the other. The problem with that is it invalidates any pass-by-reference Datums that were already fetched from the slot, since they'll be pointing into the just-freed version of the tuple. The known problem cases involve fetching both a whole-row variable and a pass-by-reference value from a slot that is fed from a tuplestore or tuplesort object. The added regression tests illustrate some simple cases, but there may be other failure scenarios traceable to the same bug. Note that the added tests probably only fail on unpatched code if it's built with --enable-cassert; otherwise the bug leads to fetching from freed memory, which will not have been overwritten without additional conditions. Fix by allowing a slot to contain both formats simultaneously; which turns out not to complicate the logic much at all, if anything it seems less contorted than before. Back-patch to 8.2, where minimal tuples were introduced.
* Fix tab completion of ANALYZE VERBOSE <tab>. It was previously confusedHeikki Linnakangas2009-03-27
| | | | | | | with EXPLAIN ANALYZE VERBOSE. Greg Sabino Mullane, reformatted by myself. Backpatch to 8.1, where the bug was introduced.
* Fix old thinko in pgp.h: the idea is to declare some named enum types,Tom Lane2009-03-25
| | | | | | | | not global variables of anonymous enum types. This didn't actually hurt much because most linkers will just merge the duplicated definitions ... but some will complain. Per bug #4731 from Ceriel Jacobs. Backpatch to 8.1 --- the declarations don't exist before that.
* Install a search tree depth limit in GIN bulk-insert operations, to preventTom Lane2009-03-24
| | | | | | | | | | | | them from degrading badly when the input is sorted or nearly so. In this scenario the tree is unbalanced to the point of becoming a mere linked list, so insertions become O(N^2). The easiest and most safely back-patchable solution is to stop growing the tree sooner, ie limit the growth of N. We might later consider a rebalancing tree algorithm, but it's not clear that the benefit would be worth the cost and complexity. Per report from Sergey Burladyan and an earlier complaint from Heikki. Back-patch to 8.2; older versions didn't have GIN indexes.
* Fix contrib/hstore to throw an error for keys or values that don't fit in itsTom Lane2009-03-15
| | | | data structure, rather than silently truncating them. Andrew Gierth
* tag 8.2.13REL8_2_13Marc G. Fournier2009-03-13
|
* Update back-branch release notes.Tom Lane2009-03-12
|
* Fix core dump due to null-pointer dereference in to_char() when datetimeTom Lane2009-03-12
| | | | | | | | | | format codes are misapplied to a numeric argument. (The code still produces a pretty bogus error message in such cases, but I'll settle for stopping the crash for now.) Per bug #4700 from Sergey Burladyan. Problem exists in all supported branches, so patch all the way back. In HEAD, also clean up some ugly coding in the nearby cache management code.
* Prevent recursion during parse of email-like string with multiple '@'.Teodor Sigaev2009-03-10
| | | | Patch by Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
* Add MUST (Mauritius Island Summer Time) to the list of known abbreviations.Heikki Linnakangas2009-03-05
| | | | | | | Mauritius began using DST in the summer 2008-2009; the Olson library has been updated already. Xavier Bugaud
* Put back our old workaround for machines that declare cbrt() in math.h butTom Lane2009-03-04
| | | | | | fail to provide the function itself. Not sure how we escaped testing anything later than 7.3 on such cases, but they still exist, as per André Volpato's report about AIX 5.3.
* Ooops ... fix some confusion between gettext() and _() in my previous patch.Tom Lane2009-03-03
| | | | | This has moved around in past releases, so just copying-and-pasting from HEAD didn't work as intended.
* When we are in error recursion trouble, arrange to suppress translation andTom Lane2009-03-02
| | | | | | | | | | | encoding conversion of any elog/ereport message being sent to the frontend. This generalizes a patch that I put in last October, which suppressed translation of only specific messages known to be associated with recursive can't-translate-the-message behavior. As shown in bug #4680, we need a more general answer in order to have some hope of coping with broken encoding conversion setups. This approach seems a good deal less klugy anyway. Patch in all supported branches.
* Fix usage of char2wchar/wchar2char. Changes:Teodor Sigaev2009-03-02
| | | | | | | | | | | | | | | | - pg_wchar and wchar_t could have different size, so char2wchar doesn't call pg_mb2wchar_with_len to prevent out-of-bound memory bug - make char2wchar/wchar2char symmetric, now they should not be called with C-locale because mbstowcs/wcstombs oftenly doesn't work correct with C-locale. - Text parser uses pg_mb2wchar_with_len directly in case of C-locale and multibyte encoding Per bug report by Hiroshi Inoue <inoue@tpf.co.jp> and following discussion. Backpatch up to 8.2 when multybyte support was implemented in tsearch.
* Fix buffer allocations in encoding conversion routines so that they won'tTom Lane2009-02-28
| | | | | | | | fail on zero-length inputs. This isn't an issue in normal use because the conversion infrastructure skips calling the converters for empty strings. However a problem was created by yesterday's patch to check whether the right conversion function is supplied in CREATE CONVERSION. The most future-proof fix seems to be to make the converters safe for this corner case.
* In CREATE CONVERSION, test that the given function is a valid conversionHeikki Linnakangas2009-02-27
| | | | | | | | function for the specified source and destination encodings. We do that by calling the function with an empty string. If it can't perform the requested conversion, it will throw an error. Backport to 7.4 - 8.3. Per bug report #4680 by Denis Afonin.
* Set isnull for errm and sqlstate local variables when they're free'd. BecauseHeikki Linnakangas2009-02-27
| | | | | | | | | | | they are out of scope for any code after that anyway, leaving isnull true should be harmless. However, PL/pgSQL Debugger doesn't seem to care about the scoping and crashed, per report by Robert Walker (bug #4635). And it's good to be tidy for debugging purposes too. Fix in 8.3, 8.2 and 8.1 branches, CVS HEAD was fixed earlier already. Analysis and fix by Ashesh Vashi and Dave Page.
* Fix an old problem in decompilation of CASE constructs: the ruleutils.c codeTom Lane2009-02-25
| | | | | | | | | | | looks for a CaseTestExpr to figure out what the parser did, but it failed to consider the possibility that an implicit coercion might be inserted above the CaseTestExpr. This could result in an Assert failure in some cases (but correct results if Asserts weren't enabled), or an "unexpected CASE WHEN clause" error in other cases. Per report from Alan Li. Back-patch to 8.1; problem doesn't exist before that because CASE was implemented differently.
* Repair a longstanding bug in CLUSTER and the rewriting variants of ALTERTom Lane2009-02-24
| | | | | | | | | | | | | | | | | | TABLE: if the command is executed by someone other than the table owner (eg, a superuser) and the table has a toast table, the toast table's pg_type row ends up with the wrong typowner, ie, the command issuer not the table owner. This is quite harmless for most purposes, since no interesting permissions checks consult the pg_type row. However, it could lead to unexpected failures if one later tries to drop the role that issued the command (in 8.1 or 8.2), or strange warnings from pg_dump afterwards (in 8.3 and up, which will allow the DROP ROLE because we don't create a "redundant" owner dependency for table rowtypes). Problem identified by Cott Lang. Back-patch to 8.1. The problem is actually far older --- the CLUSTER variant can be demonstrated in 7.0 --- but it's mostly cosmetic before 8.1 because we didn't track ownership dependencies before 8.1. Also, fixing it before 8.1 would require changing the call signature of heap_create_with_catalog(), which seems to carry a nontrivial risk of breaking add-on modules.
* Loop calling CallNamedPipe() several times in case it fails,Magnus Hagander2009-02-15
| | | | | | | since it can be transient failures, causing kill() to not properly send signals. Original patch from Steve Marshall, modified by me.
* Fix plpgsql to not treat INSERT INTO as an INTO-variables clause anywhereTom Lane2009-02-02
| | | | | | | | in the string, not just at the start. Per bug #4629 from Martin Blazek. Back-patch to 8.2; prior versions don't have the problem, at least not in the reported case, because they don't try to recognize INTO in non-SELECT statements. (IOW, this is really fallout from the RETURNING patch.)
* Defend against null input in analyze_requires_snapshot(), per reportTom Lane2009-01-30
| | | | | | | | from Rushabh Lathia. Back-patch of patch of 2009-01-08. This is necessary in 8.3, as reported by Bjorn Munch. It's not currently necessary in 8.2, AFAICS, but seems best to include it there too.
* tag 8.2.12REL8_2_12Marc G. Fournier2009-01-30
|