aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix another semijoin-ordering bug. We already knew that we couldn'tTom Lane2009-07-21
| | | | | | | | | | | | | | | | | | reorder a semijoin into or out of the righthand side of another semijoin, but actually it doesn't work to reorder it into or out of the righthand side of a left or antijoin, either. Per bug #4906 from Mathieu Fenniak. This was sloppy thinking on my part. This identity does work: ( A left join B on (Pab) ) semijoin C on (Pac) == ( A semijoin C on (Pac) ) left join B on (Pab) but I failed to see that that doesn't mean this does: ( A left join B on (Pab) ) semijoin C on (Pbc) != A left join ( B semijoin C on (Pbc) ) on (Pab)
* Properly restore pg_largeobject.relfozenxid in binary upgrade mode.Bruce Momjian2009-07-20
| | | | Backpatch to 8.4.X.
* Install src/include/utils/fmgroids.h on VPATH builds too.Alvaro Herrera2009-07-20
| | | | | | The original coding was not dealing specially with this file being a symlink, with the end result that it was not installed in VPATH builds. Oddly enough, the clean target does know about it ...
* Remove unnecessary and version-sensitive dependence on the exact set ofTom Lane2009-07-20
| | | | column names to be found in a sequence. Per gripe from Bruce.
* Fix a thinko in join_is_legal: when we decide we can implement a semijoinTom Lane2009-07-19
| | | | | | | | | | | | | | | | by unique-ifying the RHS and then inner-joining to some other relation, that is not grounds for violating the RHS of some other outer join. Noticed while regression-testing new GEQO code, which will blindly follow any path that join_is_legal says is legal, and then complain later if that leads to a dead end. I'm not certain that this can result in any visible failure in 8.4: the mistake may always be masked by the fact that subsequent attempts to join the rest of the RHS of the other join will fail. But I'm not certain it can't, either, and it's definitely not operating as intended. So back-patch. The added regression test depends on the new no-failures-allowed logic that I'm about to commit in GEQO, so no point back-patching that.
* Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoidTom Lane2009-07-18
| | | | | | | | | | | | | | | | | | | memory leakage in error recovery. We were calling FreeExprContext, and therefore invoking ExprContextCallback callbacks, in both normal and error exits from subtransactions. However this isn't very safe, as shown in recent trouble report from Frank van Vugt, in which releasing a tupledesc refcount failed. It's also unnecessary, since the resources that callbacks might wish to release should be cleaned up by other error recovery mechanisms (ie the resource owners). We only really want FreeExprContext to release memory attached to the exprcontext in the error-exit case. So, add a bool parameter to FreeExprContext to tell it not to call the callbacks. A more general solution would be to pass the isCommit bool parameter on to the callbacks, so they could do only safe things during error exit. But that would make the patch significantly more invasive and possibly break third-party code that registers ExprContextCallback callbacks. We might want to do that later in HEAD, but for now I'll just do what seems reasonable to back-patch.
* Repair bug #4926 "too few pathkeys for mergeclauses". This example showsTom Lane2009-07-17
| | | | | | | | | that the sanity checking I added to create_mergejoin_plan() in 8.3 was a few bricks shy of a load: the mergeclauses could reference pathkeys in a noncanonical order such as x,y,x, not only cases like x,x,y which is all that the code had allowed for. The odd cases only turn up when using redundant clauses in an outer join condition, which is why no one had noticed before.
* Do a conditional SPI_push/SPI_pop when replanning a query inTom Lane2009-07-14
| | | | | | | | | | | | | RevalidateCachedPlan. This is to avoid a "SPI_ERROR_CONNECT" failure when the planner calls a SPI-using function and we are already inside one. The alternative fix is to expect callers of RevalidateCachedPlan to do this, which seems likely to result in additional hard-to-detect bugs of omission. Per reports from Frank van Vugt and Marek Lewczuk. Back-patch to 8.3. It's much harder to trigger the bug in 8.3, due to a smaller set of cases in which plans can be invalidated, but it could happen. (I think perhaps only a SI reset event could make 8.3 fail here, but that's certainly within the realm of possibility.)
* Fix set_rel_width() to do something reasonable with non-Var items in aTom Lane2009-07-11
| | | | | | | | | | | | | RelOptInfo targetlist. It used to be that the only possibility other than a Var was a RowExpr representing a whole-row child Var, but as of 8.4's expanded ability to flatten appendrel members, we can get arbitrary expressions in there. Use the expression's type info and get_typavgwidth() to produce an at-least-marginally-sane result. Note that get_typavgwidth()'s fallback estimate (32 bytes) is the same as what was here before, so there will be no behavioral change for RowExprs. Noted while looking at recent gripe about constant quals pushed down to FunctionScan appendrel members ... not only were we failing to recognize the constant qual, we were getting the width estimate wrong :-(
* Fix xslt_process() to ensure that it inserts a NULL terminator after theTom Lane2009-07-10
| | | | | | | | | | | | last pair of parameter name/value strings, even when there are MAXPARAMS of them. Aboriginal bug in contrib/xml2, noted while studying bug #4912 (though I'm not sure whether there's something else involved in that report). This might be thought a security issue, since it's a potential backend crash; but considering that untrustworthy users shouldn't be allowed to get their hands on xslt_process() anyway, it's probably not worth getting excited about.
* Remove no-longer-necessary transmission of postmaster's LC_COLLATE andTom Lane2009-07-08
| | | | | | LC_CTYPE settings to children via BackendParameters. Per discussion, the postmaster is now just using system defaults anyway, so we might as well save a few cycles during backend startup.
* Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.Heikki Linnakangas2009-07-08
| | | | | | | | Otherwise, the LC_CTYPE/COLLATE setting gets reverted when using plperl, which leads to incorrect query results and index corruption. This was accidentally broken in the per-database locale patch in 8.4. Pointed out by Andrew Gierth.
* Add missing HOUR TO SECOND option to list of possible INTERVAL field sets,Tom Lane2009-07-08
| | | | | | as noted by Sebastien Flaesch. Also update the claim that we simply throw away fields outside this set --- that got changed later to only discard less-significant fields.
* Fix ancient bug in handling of to_char modifier 'TH', when used with HH.Heikki Linnakangas2009-07-06
| | | | | In what seems like an oversight, we used to treat 'TH' the same as lowercase 'th', but only with HH/HH12.
* Fix set_append_rel_pathlist() to deal intelligently with cases whereTom Lane2009-07-06
| | | | | | | | | | | substituting a child rel's output expressions into the appendrel's restriction clauses yields a pseudoconstant restriction. We might be able to skip scanning that child rel entirely (if we get constant FALSE), or generate a one-time filter. 8.3 more or less accidentally generated plans that weren't completely stupid in these cases, but that was only because an extra recursive level of subquery_planner() always occurred and allowed const-simplification to happen. 8.4's ability to pull up appendrel members with non-Var outputs exposes the fact that we need to work harder here. Per gripe from Sergey Burladyan.
* Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allowTom Lane2009-07-06
| | | | | | | parentheses around the <query expression body> that follows a WITH clause, eg with cte(foo) as ( values(0) ) ((select foo from cte)); This seems to be just an oversight/thinko in gram.y. Noted while experimenting with bug #4902.
* Fix handling of changed-Param signaling for CteScan plan nodes. We were usingTom Lane2009-07-06
| | | | | | | | | | the "cteParam" as a proxy for the possibility that the underlying CTE plan depends on outer-level variables or Params, but that doesn't work very well because it sometimes causes calling subqueries to be treated as SubPlans when they could be InitPlans. This is inefficient and also causes the outright failure exhibited in bug #4902. Instead, leave the cteParam out of it and copy the underlying CTE plan's extParams directly. Per bug #4902 from Marko Tiikkaja.
* Fix up pg_dump's --binary-upgrade option so that it behaves properly withTom Lane2009-07-02
| | | | inherited columns and check constraints. Per my recent trouble report.
* Remove useless References column for pg_listener catalog description. Per ↵Tom Lane2009-07-01
| | | | Shigehiro Honda.
* Add missed src/include/foreign subdirectory to the set installed intoTom Lane2009-07-01
| | | | INSTALLDIR/include/server/. Itagaki Takahiro
* Revert addition of "o" to tar options. This was intended to fix bug #4883,REL8_4_0Tom Lane2009-06-27
| | | | | | | | | | | but the cure appears to be worse than the disease. It turns out that GNU tar versions 1.14.x misinterpret -o as --same-owner, not --no-same-owner, leading to exactly the wrong behavior for both root and nonroot users. While that bug has been fixed for nearly five years, these tar versions are still found in the wild, notably in OS X 10.4. Given that #4883 was the first complaint we'd heard, it's definitely not worth fixing at the risk of breaking things for other users. Perhaps revisit at a later date when we're not up against a release deadline.
* Bundle v8.4.0Marc G. Fournier2009-06-27
|
* Update release notes in final preparation for 8.4.0.Tom Lane2009-06-26
|
* Add a note about SystemTap vs DTrace spelling of probe names.Tom Lane2009-06-26
|
* Marginal improvement of description of recovery_end_command.Tom Lane2009-06-26
|
* Cleanup and code review for the patch that made bgwriter active duringTom Lane2009-06-26
| | | | | | | | | | | | | archive recovery. Invent a separate state variable and inquiry function for XLogInsertAllowed() to clarify some tests and make the management of writing the end-of-recovery checkpoint less klugy. Fix several places that were incorrectly testing InRecovery when they should be looking at RecoveryInProgress or XLogInsertAllowed (because they will now be executed in the bgwriter not startup process). Clarify handling of bad LSNs passed to XLogFlush during recovery. Use a spinlock for setting/testing SharedRecoveryInProgress. Improve quite a lot of comments. Heikki and Tom
* Translation updates for 8.4 release.Peter Eisentraut2009-06-26
| | | | | File that are translated less than 80% have been removed, as per new translation team policy.
* Extract tarballs with "o" option (tar xof), to behave reasonably when runPeter Eisentraut2009-06-26
| | | | | | as root, as would usually be the case during make install. per bug #4883
* Use $(TAR) instead of tar in makefiles.Peter Eisentraut2009-06-26
|
* Add __attribute__((format_arg(1))) to the declaration of err_gettext(),Tom Lane2009-06-25
| | | | | to restore gcc's ability to crosscheck format arguments within elog.c. Noted in a test compilation with -Wformat-nonliteral enabled.
* Fix some serious bugs in archive recovery, now that bgwriter is activeHeikki Linnakangas2009-06-25
| | | | | | | | | | | | | | | | | | | | during it: When bgwriter is active, the startup process can't perform mdsync() correctly because it won't see the fsync requests accumulated in bgwriter's private pendingOpsTable. Therefore make bgwriter responsible for the end-of-recovery checkpoint as well, when it's active. When bgwriter is active (= archive recovery), the startup process must not accumulate fsync requests to its own pendingOpsTable, since bgwriter won't see them there when it performs restartpoints. Make startup process drop its pendingOpsTable when bgwriter is launched to avoid that. Update minimum recovery point one last time when leaving archive recovery. It won't be updated by the end-of-recovery checkpoint because XLogFlush() sees us as out of recovery already. This fixes bug #4879 reported by Fujii Masao.
* Man pages back to lowercase names, with additional fixup to make the .soPeter Eisentraut2009-06-25
| | | | links work.
* Make prior patch pgindent-safe.Tom Lane2009-06-25
|
* The code to unlink dropped relations in FinishPreparedTransaction() wasHeikki Linnakangas2009-06-25
| | | | | | acting like runs inside WAL recovery, but it doesn't. I must've copy-pasted this from a redo-function in the relation forks patch. Noticed by Tom Lane while he was looking through callers of smgrdounlink().
* Disable pg_standby -l option because the backend doesn't expect the recoveredHeikki Linnakangas2009-06-25
| | | | | | | | | | | | file to be a symlink. We tried to fix this issue with an earlier server-side patch, but it didn't fix the whole issue. The same bug is present in older releases as well, but the 8.4 train is about to leave the station, and I'm not sure if have consensus on whether we can remove the -l option in back-branches or do we need to attempt a server-side fix to make symlinking safe. Patch by Simon Riggs, per discussion on bug identified by Fujii Masao.
* Disallow empty passwords in LDAP authentication, the same wayMagnus Hagander2009-06-25
| | | | we already do it for PAM.
* Correct grammar in picksplit debug messagesPeter Eisentraut2009-06-24
|
* Fix incorrect LDAP example, noted by Tom.Magnus Hagander2009-06-24
|
* parse_ident_usermap() shuold use ereport(LOG) and not ERROR, and put theMagnus Hagander2009-06-24
| | | | | | return value in the *error_p variable. Noted by Tom.
* Provide a link to the UPDATE reference page in the 'Updating Data'Tom Lane2009-06-23
| | | | section of the docs. Per suggestion from Brad Bowman.
* Properly initialize SSL engines when used from libpq. This is required forMagnus Hagander2009-06-23
| | | | | | most external engines. Per report and initial code from Lars Kanis
* Fix an ancient error in dist_ps (distance from point to line segment), whichTom Lane2009-06-23
| | | | | | | | | | | | a number of other geometric operators also depend on. It miscalculated the slope of the perpendicular to the given line segment anytime that slope was other than 0, infinite, or +/-1. In some cases the error would be masked because the true closest point on the line segment was one of its endpoints rather than the intersection point, but in other cases it could give an arbitrarily bad answer. Per bug #4872 from Nick Roosevelt. Bug goes clear back to Berkeley days, so patch all supported branches. Make a couple of cosmetic adjustments while at it.
* Fix the makefiles to fail cleanly if Perl is needed but not present. ThisTom Lane2009-06-23
| | | | | | | | | | used to work as intended, but got broken some time ago (a quoted empty string is not an empty string), and got broken some more by the changes to generate ecpg's preproc.y automatically. Given all the unprotected uses of $(PERL) elsewhere, it seems best to make use of the $(missing) script rather than trying to ensure each such use is protected individually. Also fix various bits of documentation that omitted to mention Perl as a requirement for building from a CVS pull. Per a complaint from Robert Haas.
* bundle RC2REL8_4_RC2Marc G. Fournier2009-06-22
|
* For bulk write operations (eg COPY IN), use a ring buffer of 16MB insteadTom Lane2009-06-22
| | | | | | | | of the 256KB limit originally enforced by a patch committed 2008-11-06. Per recent test results, the smaller size resulted in an undesirable decrease in bulk data loading speed, due to COPY processing frequently getting blocked for WAL flushing. This area might need more tweaking later, but this setting seems to be good enough for 8.4.
* Make to_timestamp and friends skip leading spaces before an integer field,Tom Lane2009-06-22
| | | | | | | | | | | | | even when not in FM mode. This improves compatibility with Oracle and with our pre-8.4 behavior, as per bug #4862. Brendan Jurd Add a couple of regression test cases for this. In passing, get rid of the labeling of the individual test cases; doesn't seem to be good for anything except causing extra work when inserting a test... Tom Lane
* Add more explicit note that the parameters of MOVE are identical to FETCH.Peter Eisentraut2009-06-22
| | | | per David Wheeler
* Revert dubious message wording change.Tom Lane2009-06-22
|
* Message fixesPeter Eisentraut2009-06-21
|
* Fix things so that array_agg_finalfn does not modify or free its inputTom Lane2009-06-20
| | | | | | | ArrayBuildState, per trouble report from Merlin Moncure. By adopting this fix, we are essentially deciding that aggregate final-functions should not modify their inputs ever. Adjust documentation and comments to match that conclusion.