aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Repair PANIC condition in hash indexes when a previous index extension attemptTom Lane2007-04-19
| | | | | | | | | | | failed (due to lock conflicts or out-of-space). We might have already extended the index's filesystem EOF before failing, causing the EOF to be beyond what the metapage says is the last used page. Hence the invariant maintained by the code needs to be "EOF is at or beyond last used page", not "EOF is exactly the last used page". Problem was created by my patch of 2006-11-19 that attempted to repair bug #2737. Since that was back-patched to 7.4, this needs to be as well. Per report and test case from Vlastimil Krejcir.
* Release wording updates for releases 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.Bruce Momjian2007-04-19
|
* Update FAQ to mention most recent release for releasesBruce Momjian2007-04-19
| | | | 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
* Stamp releases 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.Bruce Momjian2007-04-19
|
* Release note updates for 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.Bruce Momjian2007-04-19
|
* Translation updatesPeter Eisentraut2007-04-18
|
* Don't write timing output in quiet mode.Magnus Hagander2007-04-16
| | | | Merlin Moncure
* Fix check_sql_fn_retval to allow the case where a SQL function declared toTom Lane2007-04-02
| | | | | | | | return void ends with a SELECT, if that SELECT has a single result that is also of type void. Without this, it's hard to write a void function that calls another void function. Per gripe from Peter. Back-patch as far as 8.0.
* Fix caching of unsuccessful initialization of parser or configuration.Teodor Sigaev2007-04-02
| | | | Per report from Listmail <lists@peufeu.com>
* Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNALTatsuo Ishii2007-03-26
| | | | and GB18030. patches from ITAGAKI Takahiro.
* SPI_cursor_open failed to enforce that only read-only queries could beTom Lane2007-03-17
| | | | | | | executed in read_only mode. This could lead to various relatively-subtle failures, such as an allegedly stable function returning non-stable results. Bug goes all the way back to the introduction of read-only mode in 8.0. Per report from Gaetano Mendola.
* Fix a longstanding bug in VACUUM FULL's handling of update chains. The codeTom Lane2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | did not expect that a DEAD tuple could follow a RECENTLY_DEAD tuple in an update chain, but because the OldestXmin rule for determining deadness is a simplification of reality, it is possible for this situation to occur (implying that the RECENTLY_DEAD tuple is in fact dead to all observers, but this patch does not attempt to exploit that). The code would follow a chain forward all the way, but then stop before a DEAD tuple when backing up, meaning that not all of the chain got moved. This could lead to copying the chain multiple times (resulting in duplicate copies of the live tuple at its end), or leaving dangling index entries behind (which, aside from generating warnings from later vacuums, creates a risk of wrong query results or bogus duplicate-key errors once the heap slot the index entry points to is repopulated). The fix is to recheck HeapTupleSatisfiesVacuum while following a chain forward, and to stop if a DEAD tuple is reached. Each contiguous group of RECENTLY_DEAD tuples will therefore be copied as a separate chain. The patch also adds a couple of extra sanity checks to verify correct behavior. Per report and test case from Pavan Deolasee.
* Arrange to install a "posixrules" entry in our timezone database, so thatTom Lane2007-03-14
| | | | | | | | | | | | | POSIX-style timezone specs that don't exactly match any database entry will be treated as having correct USA DST rules. Also, document that this can be changed if you want to use some other DST rules with a POSIX zone spec. We could consider changing localtime.c's TZDEFRULESTRING, but since that facility can only deal with one DST transition rule, it seems fairly useless now; might as well just plan to override it using a "posixrules" entry. Backpatch as far as 8.0. There isn't much we can do in 7.x ... either your libc gets it right, or it doesn't.
* Fix oversight in original coding of inline_function(): sinceTom Lane2007-03-06
| | | | | | | | | | | | | | check_sql_fn_retval allows binary-compatibility cases, the expression extracted from an inline-able SQL function might have a type that is only binary-compatible with the declared function result type. To avoid possibly changing the semantics of the expression, we should insert a RelabelType node in such cases. This has only been shown to have bad consequences in recent 8.1 and up releases, but I suspect there may be failure cases in the older branches too, so patch it all the way back. Per bug #3116 from Greg Mullane. Along the way, fix an omission in eval_const_expressions_mutator: it failed to copy the relabelformat field when processing a RelabelType. No known observable failures from this, but it definitely isn't intended behavior.
* Fix markQueryForLocking() to work correctly in the presence of nested views.Tom Lane2007-03-01
| | | | | It has been wrong for this case since it was first written for 7.1 :-( Per report from Pavel HanĂ¡k.
* Backported bug fix for #2956.Michael Meskes2007-02-27
|
* Fix portal management code to support non-default command completion tags forTom Lane2007-02-18
| | | | | | portals using PORTAL_UTIL_SELECT strategy. This is currently significant only for FETCH queries, which are supposed to include a count in the tag. Seems it's been broken since 7.4, but nobody noticed before Knut Lehre.
* Fix backend crash in parsing incorrect tsquery.Teodor Sigaev2007-02-12
| | | | Per report from Jon Rosebaugh <jon@inklesspen.com>
* Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it couldTom Lane2007-02-08
| | | | | | | | | | | | | | | | | | | get away with not (re)initializing a local variable if the variable is marked "isconst" and not "isnull". Unfortunately it makes this decision after having already freed the old value, meaning that something like for i in 1..10 loop declare c constant text := 'hi there'; leads to subsequent accesses to freed memory, and hence probably crashes. (In particular, this is why Asif Ali Rehman's bug leads to crash and not just an unexpectedly-NULL value for SQLERRM: SQLERRM is marked CONSTANT and so triggers this error.) The whole thing seems wrong on its face anyway: CONSTANT means that you can't change the variable inside the block, not that the initializer expression is guaranteed not to change value across successive block entries. Hence, remove the "optimization" instead of trying to fix it.
* Rearrange use of plpgsql_add_initdatums() so that only the parsing of aTom Lane2007-02-08
| | | | | | | | | | | | | | DECLARE section needs to know about it. Formerly, everyplace besides DECLARE that created variables needed to do "plpgsql_add_initdatums(NULL)" to prevent those variables from being sucked up as part of a subsequent DECLARE block. This is obviously error-prone, and in fact the SQLSTATE/SQLERRM patch had failed to do it for those two variables, leading to the bug recently exhibited by Asif Ali Rehman: a DECLARE within an exception handler tried to reinitialize SQLERRM. Although the SQLSTATE/SQLERRM patch isn't in any pre-8.1 branches, and so I can't point to a demonstrable failure there, it seems wise to back-patch this into the older branches anyway, just to keep the logic similar to HEAD.
* Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.REL8_0_12Bruce Momjian2007-02-07
|
* Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet.Bruce Momjian2007-02-07
|
* Fix an error in the original coding of holdable cursors: PersistHoldablePortalTom Lane2007-02-06
| | | | | | | | | | | thought that it didn't have to reposition the underlying tuplestore if the portal is atEnd. But this is not so, because tuplestores have separate read and write cursors ... and the read cursor hasn't moved from the start. This mistake explains bug #2970 from William Zhang. Note: the coding here is pretty inefficient, but given that no one has noticed this bug until now, I'd say hardly anyone uses the case where the cursor has been advanced before being persisted. So maybe it's not worth worrying about.
* Remove typmod checking from the recent security-related patches. It turnsTom Lane2007-02-06
| | | | | | | | | | | | | out that ExecEvalVar and friends don't necessarily have access to a tuple descriptor with correct typmod: it definitely can contain -1, and possibly might contain other values that are different from the Var's value. Arguably this should be cleaned up someday, but it's not a simple change, and in any case typmod discrepancies don't pose a security hazard. Per reports from numerous people :-( I'm not entirely sure whether the failure can occur in 8.0 --- the simple test cases reported so far don't trigger it there. But back-patch the change all the way anyway.
* Backported va_list handling cleanupMichael Meskes2007-02-06
|
* Reword suggestion that libpq.dll be installed in WINNT\SYSTEM32 underNeil Conway2007-02-02
| | | | Windows. Per Magnus Hagander, this is not recommended.
* Stamp release 8.0.11.REL8_0_11Tom Lane2007-02-02
| | | | Security: CVE-2007-0555, CVE-2007-0556
* Update release notes for security-related releases in all active branches.Tom Lane2007-02-02
| | | | Security: CVE-2007-0555, CVE-2007-0556
* Repair failure to check that a table is still compatible with a previouslyTom Lane2007-02-02
| | | | | | | | | | | | | | | | | | | | | | made query plan. Use of ALTER COLUMN TYPE creates a hazard for cached query plans: they could contain Vars that claim a column has a different type than it now has. Fix this by checking during plan startup that Vars at relation scan level match the current relation tuple descriptor. Since at that point we already have at least AccessShareLock, we can be sure the column type will not change underneath us later in the query. However, since a backend's locks do not conflict against itself, there is still a hole for an attacker to exploit: he could try to execute ALTER COLUMN TYPE while a query is in progress in the current backend. Seal that hole by rejecting ALTER TABLE whenever the target relation is already open in the current backend. This is a significant security hole: not only can one trivially crash the backend, but with appropriate misuse of pass-by-reference datatypes it is possible to read out arbitrary locations in the server process's memory, which could allow retrieving database content the user should not be able to see. Our thanks to Jeff Trout for the initial report. Security: CVE-2007-0556
* Repair insufficiently careful type checking for SQL-language functions:Tom Lane2007-02-02
| | | | | | | | | | | | | | | | we should check that the function code returns the claimed result datatype every time we parse the function for execution. Formerly, for simple scalar result types we assumed the creation-time check was sufficient, but this fails if the function selects from a table that's been redefined since then, and even more obviously fails if check_function_bodies had been OFF. This is a significant security hole: not only can one trivially crash the backend, but with appropriate misuse of pass-by-reference datatypes it is possible to read out arbitrary locations in the server process's memory, which could allow retrieving database content the user should not be able to see. Our thanks to Jeff Trout for the initial report. Security: CVE-2007-0555
* Translation updatesPeter Eisentraut2007-01-31
|
* Add SPI_push/SPI_pop calls so that datatype input and output functions calledTom Lane2007-01-30
| | | | | | | | | by plpgsql can themselves use SPI --- possibly indirectly, as in the case of domain_in() invoking plpgsql functions in a domain check constraint. Per bug #2945 from Sergiy Vyshnevetskiy. Somewhat arbitrarily, I've chosen to back-patch this as far as 8.0. Given the lack of prior complaints, it doesn't seem critical for 7.x.
* Correct an old logic error in btree page splitting: when considering a splitTom Lane2007-01-27
| | | | | | | | | | | | exactly at the point where we need to insert a new item, the calculation used the wrong size for the "high key" of the new left page. This could lead to choosing an unworkable split, resulting in "PANIC: failed to add item to the left sibling" (or "right sibling") failure. Although this bug has been there a long time, it's very difficult to trigger a failure before 8.2, since there was generally a lot of free space on both sides of a chosen split. In 8.2, where the user-selected fill factor determines how much free space the code tries to leave, an unworkable split is much more likely. Report by Joe Conway, diagnosis and fix by Heikki Linnakangas.
* Get pg_utf_mblen(), pg_utf2wchar_with_len(), and utf2ucs() all on the sameTom Lane2007-01-24
| | | | | | | | | | | | | | | | | | | | | page about the maximum UTF8 sequence length we support (4 bytes since 8.1, 3 before that). pg_utf2wchar_with_len never got updated to support 4-byte characters at all, and in any case had a buffer-overrun risk in that it could produce multiple pg_wchars from what mblen claims to be just one UTF8 character. The only reason we don't have a major security hole is that most callers allocate worst-case output buffers; the sole exception in released versions appears to be pre-8.2 iwchareq() (ie, ILIKE), which can be crashed due to zeroing out its return address --- but AFAICS that can't be exploited for anything more than a crash, due to inability to control what gets written there. Per report from James Russell and Michael Fuhr. Pre-8.1 the risk is much less, but I still think pg_utf2wchar_with_len's behavior given an incomplete final character risks buffer overrun, so back-patch that logic change anyway. This patch also makes sure that UTF8 sequences exceeding the supported length (whichever it is) are consistently treated as error cases, rather than being treated like a valid shorter sequence in some places.
* Relax an Assert() that has been found to be too strict in some situationsTom Lane2007-01-24
| | | | | | | involving unions of types having typmods. Variants of the failure are known to occur in 8.1 and up; not sure if it's possible in 8.0 and 7.4, but since the code exists that far back, I'll just patch 'em all. Per report from Brian Hurt.
* Back port patch.Tatsuo Ishii2007-01-13
| | | | | | | | Call srandom() instead of srand(). pgbench calls random() later, so it should have called srandom(). On most platforms except Windows srandom() is actually identical to srand(), so the bug only bites Windows users. per bug report from Akio Ishida.
* tag itREL8_0_10PostgreSQL Daemon2007-01-06
|
* Links to GUC variables from HISTORY don't work in back branches...Tom Lane2007-01-06
|
* Fix markup because older releases couldn't link to the reference section.Bruce Momjian2007-01-06
|
* Minor copy-editing for release note updates.Tom Lane2007-01-05
|
* Stamp release 8.0.10.Bruce Momjian2007-01-05
|
* Create release notes for 8.0.10.Bruce Momjian2007-01-05
|
* Fix regex_fixed_prefix() to cope reasonably well with regex patterns of theTom Lane2007-01-03
| | | | | | | | | | form '^(foo)$'. Before, these could never be optimized into indexscans. The recent changes to make psql and pg_dump generate such patterns (for \d commands and -t and related switches, respectively) therefore represented a big performance hit for people with large pg_class catalogs, as seen in recent gripe from Erik Jones. While at it, be more paranoid about case-sensitivity checking in multibyte encodings, and fix some other corner cases in which a regex might be interpreted too liberally.
* Repair bug #2839: the various ExecReScan functions need to resetTom Lane2006-12-26
| | | | | | | | | ps_TupFromTlist in plan nodes that make use of it. This was being done correctly in join nodes and Result nodes but not in any relation-scan nodes. Bug would lead to bogus results if a set-returning function appeared in the targetlist of a subquery that could be rescanned after partial execution, for example a subquery within EXISTS(). Bug has been around forever :-( ... surprising it wasn't reported before.
* Fix convertion for 'PFX flag N num'Teodor Sigaev2006-12-21
|
* Document the recently-understood hazard that a rollback can release row-levelTom Lane2006-12-01
| | | | | | locks that logically should not be released, because when a subtransaction overwrites XMAX all knowledge of the previous lock state is lost. It seems unlikely that we will be able to fix this before 8.3...
* Update timezone data to tzdata2006p zic distribution. It seems WesternTom Lane2006-11-28
| | | | | Australia decided to institute DST with one month's notice ... way to go, politicians.
* Mark to_number() and the numeric-type variants of to_char() as stable, notTom Lane2006-11-28
| | | | | | immutable, because their results depend on lc_numeric; this is a longstanding oversight. We cannot force initdb for this in the back branches, but we can at least provide correct catalog entries for future installations.
* Fix psql's \copy command to ensure that it cycles libpq back to the idle stateTom Lane2006-11-24
| | | | | | | | | (in particular, causing the ReadyForQuery message to be eaten) before returning from do_copy. The only known consequence of failing to do so is that get_prompt might show a wrong result for the %x transaction status escape, as reported by Bernd Helmle; but it's possible there are other issues. Back-patch as far as 7.4, the oldest version supporting %x.
* Fix 1-byte buffer overrun when OID exceeds 1 billion. This probably can'tTom Lane2006-11-22
| | | | | | cause any serious harm in normal cases, but if you have gcc buffer overrun checking turned on, that will notice. Found by Jack Orenstein. Problem was already fixed in CVS HEAD.