aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Fix broken markupAlvaro Herrera2009-08-27
| | | | Jan Urbański
* Fix handling of autovacuum reloptions.Alvaro Herrera2009-08-27
| | | | | | | | In the original coding, setting a single reloption would cause default values to be used for all the other reloptions. This is a problem particularly for autovacuum reloptions. Itagaki Takahiro
* In the checkpoint written at the end of archive recovery, the WAL page headerHeikki Linnakangas2009-08-27
| | | | | | | | | | was incorrectly initialized with timeline ID 0. That rendered the WAL page unrecoverable, making a subsequent archive recovery stop at that point. ThisTimeLineID needs to be initialized before calling AdvanceXLInsertBuffer(). This fixes bug #5011 reported by James Bardin. Backpatch to 8.4, as the bug was introduced by the changes to use of bgwriter for writing the end-of-archive-recovery checkpoint. Patch by Tom Lane.
* Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8, 8.4.1.Bruce Momjian2009-08-27
|
* Try to make silent_mode behave somewhat reasonably.Tom Lane2009-08-24
| | | | | | | | | | | | | | | | | | | | | | Instead of sending stdout/stderr to /dev/null after forking away from the terminal, send them to postmaster.log within the data directory. Since this opens the door to indefinite logfile bloat, recommend even more strongly that log output be redirected when using silent_mode. Move the postmaster's initial calls of load_hba() and load_ident() down to after we have started the log collector, if we are going to. This is so that errors reported by them will appear in the "usual" place. Reclassify silent_mode as a LOGGING_WHERE, not LOGGING_WHEN, parameter, since it's got absolutely nothing to do with the latter category. In passing, fix some obsolete references to -S ... this option hasn't had that switch letter for a long time. Back-patch to 8.4, since as of 8.4 load_hba() and load_ident() are more picky (and thus more likely to fail) than they used to be. This entire change was driven by a complaint about those errors disappearing into the bit bucket.
* Small correction to previous patch: we shouldn't ReleasePostmasterChildSlotTom Lane2009-08-24
| | | | for a dead_end child, because we didn't AssignPostmasterChildSlot.
* Avoid calling kill() in a postmaster signal handler.Alvaro Herrera2009-08-24
| | | | | | | | | | | | | | | This causes problems when the system load is high, per report from Zdenek Kotala in <1250860954.1239.114.camel@localhost>; instead of calling kill directly, have the signal handler set a flag which is checked in ServerLoop. This way, the handler can return before being called again by a subsequent signal sent from the autovacuum launcher. Also, increase the sleep in the launcher in this failure path to 1 second. Backpatch to 8.3, which is when the signalling between autovacuum launcher/postmaster was introduced. Also, add a couple of ReleasePostmasterChildSlot calls in error paths; this part backpatched to 8.4 which is when the child slot stuff was introduced.
* Fix inclusions of readline/editline header files so that we only attempt toTom Lane2009-08-24
| | | | | | #include the version of history.h that is in the same directory as the readline.h we are using. This avoids problems in some scenarios where both readline and editline are installed. Report and patch by Zdenek Kotala.
* Fix a violation of WAL coding rules in the recent patch to include anTom Lane2009-08-24
| | | | | | | | | | | "all tuples visible" flag in heap page headers. The flag update *must* be applied before calling XLogInsert, but heap_update and the tuple moving routines in VACUUM FULL were ignoring this rule. A crash and replay could therefore leave the flag incorrectly set, causing rows to appear visible in seqscans when they should not be. This might explain recent reports of data corruption from Jeff Ross and others. In passing, do a bit of editorialization on comments in visibilitymap.c.
* Tweak ExecIndexEvalRuntimeKeys to forcibly detoast any toasted comparisonTom Lane2009-08-23
| | | | | | | | | | | | | | | | | | values before they get passed to the index access method. This avoids repeated detoastings that will otherwise ensue as the comparison value is examined by various index support functions. We have seen a couple of reports of cases where repeated detoastings result in an order-of-magnitude slowdown, so it seems worth adding a bit of extra logic to prevent this. I had previously proposed trying to avoid duplicate detoastings in general, but this fix takes care of what seems the most important case in practice with very little effort or risk. Back-patch to 8.4 so that the PostGIS folk won't have to wait a year to have this fix in a production release. (The issue exists further back, of course, but the code's diverged enough to make backpatching further a higher-risk action. Also it appears that the possible gains may be limited in prior releases because of different handling of lossy operators.)
* Fix overflow for INTERVAL 'x ms' where x is more than a couple million,Tom Lane2009-08-18
| | | | | | | and integer datetimes are in use. Per bug report from Hubert Depesz Lubaczewski. Alex Hunsaker
* Fix imprecise documentation of random(): it never returns 1.0.Tom Lane2009-08-16
| | | | | This was changed in 8.2 but the documentation was not corrected. Per gripe from Sam Mason.
* Fix incorrect encoding-aware name truncation in makeArrayTypeName().Tom Lane2009-08-16
| | | | | | | | | | | | truncate_identifier won't do anything if the passed-in strlen is already less than NAMEDATALEN, which it always would be given the strlcpy usage. This has been broken since the arrays-of-composite-types code went in. Arguably truncate_identifier is suffering from excessive optimization and should always process the string, but for the moment I'll take the more localized patch. Per bug #4987.
* Remove tab in SGML.Bruce Momjian2009-08-15
|
* Put back adjust_appendrel_attrs()'s code for dealing with RestrictInfo.Tom Lane2009-08-13
| | | | | | I mistakenly removed it last month, thinking it was no longer needed --- but it is still needed for dealing with joininfo lists. Fortunately this bit of brain fade hadn't made it into any released versions yet.
* Fix old bug in log_autovacuum_min_duration code: it was relying on being ableTom Lane2009-08-12
| | | | | | | | to access a Relation entry it had just closed. I happened to be testing with CLOBBER_CACHE_ALWAYS, which made this a guaranteed core dump (at least on machines where sprintf %s isn't forgiving of a NULL pointer). It's probably quite unlikely that it would fail in the field, but a bug is a bug. Fix by moving the relation_close call down past the logging action.
* Reserve the shared memory region during backend startup on Windows, soMagnus Hagander2009-08-11
| | | | | | | | | | that memory allocated by starting third party DLLs doesn't end up conflicting with it. Hopefully this solves the long-time issue with "could not reattach to shared memory" errors on Win32. Patch from Tsutomu Yamada and me, based on idea from Trevor Talbot.
* Fix URL to "The Hitch-Hiker's Guide to Evolutionary Computation".Alvaro Herrera2009-08-10
| | | | | Per Andreas Wenk, Andres Freund and Rob Wultsh. Thanks, Robert Haas, for the patch.
* Fix number of columns declared for pg_user_mappings description table.Alvaro Herrera2009-08-10
|
* Adjust test_fsync code to be more sane.Bruce Momjian2009-08-10
| | | | Backpatch to 8.4.X.
* Enable the use of multiple CPUs/cores when building on MSVC. This onlyMagnus Hagander2009-08-10
| | | | | affects the C compiler step - we still only build one target at a time.
* Re-add documentation for --no-readline option of psql, mistakenly removed a ↵Andrew Dunstan2009-08-10
| | | | decade ago. Backpatch to release 7.4.
* Document that LocalSetXLogInsertAllowed can be re-executed.Tom Lane2009-08-08
| | | | Per comment from Simon.
* Document that autovacuum may run ANALYZEAlvaro Herrera2009-08-07
|
* Try to defend against the possibility that libpq is still in COPY_IN stateTom Lane2009-08-07
| | | | | | | | | | when we reach the post-COPY "pump it dry" error recovery code that was added 2006-11-24. Per a report from Neil Best, there is at least one code path in which this occurs, leading to an infinite loop in code that's supposed to be making it more robust not less so. A reasonable response seems to be to call PQputCopyEnd() again, so let's try that. Back-patch to all versions that contain the cleanup loop.
* rm_cleanup functions need to be allowed to write WAL entries. This oversightTom Lane2009-08-07
| | | | | appears to explain the recent reports of "PANIC: cannot make new WAL entries during recovery".
* Fix some omissions in the dependency-object-class support for SQL/MED objects.Tom Lane2009-08-07
| | | | Main problem found by Muhammad Aqeel, some cosmetic additions by me.
* Fast shutdown stop should forcibly disconnect any active backends, evenHeikki Linnakangas2009-08-07
| | | | | | | if a smart shutdown is already in progress. Backpatch to 8.3, this was broken in the patch that introduced "dead-end backends". Per report by Itagaki Takahiro, patch by Fujii Masao.
* Make sure FD_SETSIZE is set before we include any WindowsMagnus Hagander2009-07-30
| | | | | | header files. Josh Williams
* Fix time_part and timetz_part (ie, EXTRACT() for those datatypes) toTom Lane2009-07-29
| | | | | | | | | | | | | | | | include a fractional part in the output for MILLISECOND and SECOND cases, rather than truncating the source value. This is what the float-timestamp code has always done, and it was clearly the code author's intent to do the same for integer timestamps, but he forgot about integer division in C. The other datatypes supported by EXTRACT() already do this correctly. Backpatch to 8.4, so that the default (integer) behavior of that branch will match the default (float) behavior of older branches. Arguably we should patch further back, but it's possible that applications are expecting the broken behavior in older branches. 8.4 is new enough that expectations shouldn't be too settled. Per report from Greg Stark.
* Fix a thinko introduced into CountActiveBackends by a recent patch:Tom Lane2009-07-29
| | | | | | | | we should ignore NULL array entries, not non-NULL ones. This had the effect of disabling commit_delay, and could have caused a crash in the rare race condition the patch was intended to fix. Bug report and diagnosis by Jeff Janes, in bug #4952.
* Fix incorrect cleanup of tsquery in ts_rewrite(). Per bug #4933 byTeodor Sigaev2009-07-28
| | | | Aaron Marcuse-Kubitza <aaronmk@blackducksoftware.com>
* Improve comment, per gripe from Alvaro.Tom Lane2009-07-27
|
* Fix pg_stat_statements for EXEC_BACKEND case.Tom Lane2009-07-27
| | | | | | | We should not try to load old statistics when re-attaching to existing shared memory. Per bug #4941. Itagaki Takahiro
* Document \dg+ and \du+Peter Eisentraut2009-07-24
| | | | | | | | The fact that \dg and \du take the + option was missing in the documentation. backpatched to 8.4 Author: Andreas Wenk <a.wenk@netzmeister-st-pauli.de>
* In a non-hashed Agg node, reset the "aggcontext" at group boundaries, insteadTom Lane2009-07-23
| | | | | | | | | | | of individually pfree'ing pass-by-reference transition values. This should be at least as fast as the prior coding, and it has the major advantage of clearing out any working data an aggregate function may have stored in or underneath the aggcontext. This avoids memory leakage when an aggregate such as array_agg() is used in GROUP BY mode. Per report from Chris Spotts. Back-patch to 8.4. In principle the problem could arise in prior versions, but since they didn't have array_agg the issue seems not critical.
* Fix another thinko in join_is_legal's handling of semijoins: we have to testTom Lane2009-07-23
| | | | | | | | | | | | | | | for the case that the semijoin was implemented within either input by unique-ifying its RHS before we test to see if it appears to match the current join situation. The previous coding would select semijoin logic in situations where we'd already unique-ified the RHS and joined it to some unrelated relation(s), and then came to join it to the semijoin's LHS. That still gave the right answer as far as the semijoin itself was concerned, but would lead to incorrectly examining only an arbitrary one of the matchable rows from the unrelated relation(s). The cause of this thinko was incorrect unification of the pre-8.4 logic for IN joins and OUTER joins --- the comparable case for outer joins can be handled after making the match test, but that's because there is nothing like the unique-ification escape hatch for outer joins. Per bug #4934 from Benjamin Reed.
* Fix mismatch in const:ness of parameters.Magnus Hagander2009-07-22
|
* Remove translated FAQsPeter Eisentraut2009-07-21
| | | | | | | | | | The English FAQ has been moved to the wiki, so the translated versions should have been removed at that point as well. The FAQ_MINGW.html should have been removed when the platform FAQs were integrated into the documentation (or earlier). applied to both 8.4 and 8.5
* 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.