aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* More clearly document that most PostgreSQL utilities support libpqBruce Momjian2007-02-20
| | | | environment variables. Backpatch to 8.2.X.
* Spell check on array patch.Bruce Momjian2007-02-20
|
* Update array slice documentation to be clearer.Bruce Momjian2007-02-20
|
* Comment-out documentation for IS OF because it doesn't conform to theBruce Momjian2007-02-20
| | | | ISO SQL behavior. Backpatch removal to 8.2.X.
* Document IS [NOT] OF, which was added in 7.3.Bruce Momjian2007-02-20
|
* Update PQfree() documentation to be clearer, backpatch to 8.2.X.Bruce Momjian2007-02-19
|
* Fix pg_dump on win32 to properly dump files larger than 2Gb when usingMagnus Hagander2007-02-19
| | | | binary dump formats.
* 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.
* Adjust the definition of is_pushed_down so that it's always true for INNERTom Lane2007-02-16
| | | | | | | | | JOIN quals, just like WHERE quals, even if they reference every one of the join's relations. Now that we can reorder outer and inner joins, it's possible for such a qual to end up being assigned to an outer join plan node, and we mustn't have it treated as a join qual rather than a filter qual for the node. (If it were, the join could produce null-extended rows that it shouldn't.) Per bug report from Pelle Johansson.
* Fix another problem in 8.2 changes that allowed "one-time" qual conditions toTom Lane2007-02-16
| | | | | | | be checked at plan levels below the top; namely, we have to allow for Result nodes inserted just above a nestloop inner indexscan. Should think about using the general Param mechanism to pass down outer-relation variables, but for the moment we need a back-patchable solution. Per report from Phil Frost.
* Restructure code that is responsible for ensuring that clauseless joins areTom Lane2007-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | considered when it is necessary to do so because of a join-order restriction (that is, an outer-join or IN-subselect construct). The former coding was a bit ad-hoc and inconsistent, and it missed some cases, as exposed by Mario Weilguni's recent bug report. His specific problem was that an IN could be turned into a "clauseless" join due to constant-propagation removing the IN's joinclause, and if the IN's subselect involved more than one relation and there was more than one such IN linking to the same upper relation, then the only valid join orders involve "bushy" plans but we would fail to consider the specific paths needed to get there. (See the example case added to the join regression test.) On examining the code I wonder if there weren't some other problem cases too; in particular it seems that GEQO was defending against a different set of corner cases than the main planner was. There was also an efficiency problem, in that when we did realize we needed a clauseless join because of an IN, we'd consider clauseless joins against every other relation whether this was sensible or not. It seems a better design is to use the outer-join and in-clause lists as a backup heuristic, just as the rule of joining only where there are joinclauses is a heuristic: we'll join two relations if they have a usable joinclause *or* this might be necessary to satisfy an outer-join or IN-clause join order restriction. I refactored the code to have just one place considering this instead of three, and made sure that it covered all the cases that any of them had been considering. Backpatch as far as 8.1 (which has only the IN-clause form of the disease). By rights 8.0 and 7.4 should have the bug too, but they accidentally fail to fail, because the joininfo structure used in those releases preserves some memory of there having once been a joinclause between the inner and outer sides of an IN, and so it leads the code in the right direction anyway. I'll be conservative and not touch them.
* Repair oversight in 8.2 change that improved the handling of "pseudoconstant"Tom Lane2007-02-15
| | | | | | | | | WHERE clauses. createplan.c is now willing to stick a gating Result node almost anywhere in the plan tree, and in particular one can wind up directly underneath a MergeJoin node. This means it had better be willing to handle Mark/Restore. Fortunately, that's trivial in such cases, since we can just pass off the call to the input node (which the planner has previously ensured can handle Mark/Restore). Per report from Phil Frost.
* Disallow committing a prepared transaction unless we are in the same databaseTom Lane2007-02-13
| | | | | it was executed in. Someday it might be nice to allow cross-DB commits, but work would be needed in NOTIFY and perhaps other places. Per Heikki.
* Repair bug in 8.2's new logic for planning outer joins: we have to allow joinsTom Lane2007-02-13
| | | | | | | | that overlap an outer join's min_righthand but aren't fully contained in it, to support joining within the RHS after having performed an outer join that can commute with this one. Aside from the direct fix in make_join_rel(), fix has_join_restriction() and GEQO's desirable_join() to consider this possibility. Per report from Ian Harding.
* Fix backend crash in parsing incorrect tsquery.Teodor Sigaev2007-02-12
| | | | Per report from Jon Rosebaugh <jon@inklesspen.com>
* Fix for early log messages during postmaster startup getting lost whenMagnus Hagander2007-02-11
| | | | | | | | running as a service on Win32. Per report from Harald Armin Massa. Backpatch to 8.2.
* Fix bug when localized to_char() day or month names were incorectlyBruce Momjian2007-02-08
| | | | | | | | trnasformed to lower or upper string. Backpatch to 8.2.X. Pavel Stehule
* 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.
* This patch fixes shared_preload_libraries on Windows hosts. It forcesBruce Momjian2007-02-08
| | | | | | | | each backend to re-load all shared_preload_libraries. Backpatch to 8.2.X. Korry Douglas
* Update URL for "Generalized Partial Indexes" paper to point to a cachedBruce Momjian2007-02-08
| | | | | | version. Backpatch to 8.2.X.
* Document that wal_sync_method open_* methods use O_DIRECT, if available.Bruce Momjian2007-02-08
| | | | Backpatch to 8.2.X.
* Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.REL8_2_3Bruce Momjian2007-02-07
|
* Fix PG_VERSION_NUM too.Tom Lane2007-02-07
|
* Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet.Bruce Momjian2007-02-07
|
* Update FAQ for 8.2.3.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.
* Backpatch FAQs to 8.2.X branch.Bruce Momjian2007-02-06
|
* 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 regression test changes from HEAD so the buildfarm hopefully gets ↵Michael Meskes2007-02-06
| | | | green again.
* Backported va_list handling cleanupMichael Meskes2007-02-06
|
* Fix a performance regression in 8.2: optimization of MIN/MAX into indexscansTom Lane2007-02-06
| | | | | | | had stopped working for tables buried inside views or sub-selects. This is because I had gotten rid of the simplify_jointree() preprocessing step, and optimize_minmax_aggregates() wasn't smart enough to deal with a non-canonical FromExpr. Per gripe from Bill Howe.
* Not only did we agree that this 'hint' doesn't belong here, but theTom Lane2007-02-06
| | | | markup's broken. So just remove it...
* Trim down environment variable instructions for Win32, backpatch to 8.2.X.Bruce Momjian2007-02-05
|
* Pass modern COPY syntax to backend, since copy (query) does not accept old ↵Andrew Dunstan2007-02-05
| | | | syntax. Per complaint from Michael Fuhr.
* Don't MAXALIGN in the checks to decide whether a tuple is over TOAST'sTom Lane2007-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | threshold for tuple length. On 4-byte-MAXALIGN machines, the toast code creates tuples that have t_len exactly TOAST_TUPLE_THRESHOLD ... but this number is not itself maxaligned, so if heap_insert maxaligns t_len before comparing to TOAST_TUPLE_THRESHOLD, it'll uselessly recurse back to tuptoaster.c, wasting cycles. (It turns out that this does not happen on 8-byte-MAXALIGN machines, because for them the outer MAXALIGN in the TOAST_MAX_CHUNK_SIZE macro reduces TOAST_MAX_CHUNK_SIZE so that toast tuples will be less than TOAST_TUPLE_THRESHOLD in size. That MAXALIGN is really incorrect, but we can't remove it now, see below.) There isn't any particular value in maxaligning before comparing to the thresholds, so just don't do that, which saves a small number of cycles in itself. These numbers should be rejiggered to minimize wasted space on toast-relation pages, but we can't do that in the back branches because changing TOAST_MAX_CHUNK_SIZE would force an initdb (by changing the contents of toast tables). We can move the toast decision thresholds a bit, though, which is what this patch effectively does. Thanks to Pavan Deolasee for discovering the unintended recursion. Back-patch into 8.2, but not further, pending more testing. (HEAD is about to get a further patch modifying the thresholds, so it won't help much for testing this form of the patch.)
* Update wording.Bruce Momjian2007-02-04
|
* Add documentation for Windows on how to set an environment variable.Bruce Momjian2007-02-04
| | | | Backpatch to 8.2.X.
* Document that a client-only install using:Bruce Momjian2007-02-03
| | | | | | gmake -C src/bin install does install a few server-only binaries.
* Fix configure detection code when --with-ldap and --enable-thread-safetyBruce Momjian2007-02-03
| | | | | | | | are both used. Backpatch to 8.2.X. Albe Laurenz
* 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.2.2.REL8_2_2Tom 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
* Mention file system replication as a high availability solution in theBruce Momjian2007-02-01
| | | | shared hardware section, and mention DRBD as a popular solution.
* Fix plpgsql so that when a local variable has no initial-value expression,Tom Lane2007-02-01
| | | | | an error will be thrown correctly if the variable is of a NOT NULL domain. Report and almost-correct fix from Sergiy Vyshnevetskiy (bug #2948).
* Backpatch last night's fix for broken markup to the 8.2 branch.Neil Conway2007-02-01
|
* Add 8.2.0 "Incomatibilities" documentation that pg_dump's -n and -tBruce Momjian2007-02-01
| | | | behavior has changed.
* Backpatch FAQs to stable branch.Bruce Momjian2007-02-01
|