| Committer | Rewrite GEQO's gimme_tree function so that it always finds a legal join sequence, even when the input "tour" doesn't lead directly to such a sequence. The stack logic that was added in 2004 only supported cases where relations that had to be joined to each other (due to join order restrictions) were adjacent in the tour. However, relying on a random search to figure that out is tremendously inefficient in large join problems, and could even fail completely (leading to "failed to make a valid plan" errors) if random_init_pool ran out of patience. It seems better to make the tour-to-plan transformation a little bit fuzzier so that every tour can form a legal plan, even though this means that apparently different tours will sometimes yield the same plan. 400e2c93 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 19, 2009 |
| CommitterBackported | Fix a thinko in join_is_legal: when we decide we can implement a semijoin 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. a43b190e | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+16 more | No linked thread | Jul 19, 2009 |
| CommitterBackported | Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid 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. 011eae60 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+16 more | No linked thread | Jul 18, 2009 |
| CommitterBackported | Repair bug #4926 "too few pathkeys for mergeclauses". This example shows 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. fb180559 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+17 more | No linked thread | Jul 17, 2009 |
| Committer | Make GEQO's planning deterministic by having it start from a predictable random number seed each time. This is how it used to work years ago, but we got rid of the seed reset because it was resetting the main random() sequence and thus having undesirable effects on the rest of the system. To fix, establish a private random number state for each execution of geqo(), and initialize the state using the new GUC variable geqo_seed. People who want to experiment with different random searches can do so by changing geqo_seed, but you'll always get the same plan for the same value of geqo_seed (if holding all other planner inputs constant, of course). f5bc7419 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 16, 2009 |
| Committer | Add erand48() to the set of functions supported by our src/port/ library, and extend configure to test for it properly instead of hard-wiring an assumption that everybody but Windows has the rand48 functions. (We do cheat to the extent of assuming that probing for erand48 will do for the entire rand48 family.) c43feefa | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 16, 2009 |
| Committer | Remove duplicate definition of TYPECAST token. (Apparently, some but not all versions of Bison will warn about this.) 4baaaf7a | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 14, 2009 |
| Committer | Tweak the core scanner so that it can be used by plpgsql too. 1aa58d3a | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 14, 2009 |
| CommitterBackported | Do a conditional SPI_push/SPI_pop when replanning a query in 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. 0d4899e4 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+17 more | No linked thread | Jul 14, 2009 |
| Committer | Make the configure messages rejecting old bison and flex versions include the full path and version of the program being rejected. dcc9d373 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 13, 2009 |
| Committer | Although the flex documentation avers that yyalloc and yyrealloc take size_t arguments, the emitted scanner actually prototypes them with type yy_size_t, which is sometimes not the same thing depending on flex version and platform. Easiest fix seems to be to use yy_size_t. Per buildfarm results. 34a11144 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 13, 2009 |
| Committer | Convert the core lexer and parser into fully reentrant code, by making use of features added to flex and bison since this code was originally written. This change doesn't in itself offer any new capability, but it's needed infrastructure for planned improvements in plpgsql. 91e71929 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 13, 2009 |
| Committer | Advance the minimum required version of "flex" from 2.5.4 to 2.5.31, and update documentation accordingly. This is required in order to have support for a reentrant scanner. I'm committing this bit separately in order to have an easy reference if we later decide to make the minimum something different (like 2.5.33). da4b9001 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 13, 2009 |
| Committer | Fix up PGDLLIMPORT marking for standard_conforming_strings. Moving it into a header file that plpgsql's scan.l can see broke the previous kluge. Per buildfarm results. f1d9c299 | master8.5alpha1REL_19_STABLE8.5alpha1REL_18_STABLE8.5alpha1REL_17_STABLE8.5alpha1REL_16_STABLE8.5alpha1REL_15_STABLE8.5alpha1REL_14_STABLE8.5alpha1REL_13_STABLE8.5alpha1+15 more | No linked thread | Jul 13, 2009 |