aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Document that multiple LDAP servers can be specifiedMagnus Hagander2011-11-01
|
* Stop btree indexscans upon reaching nulls in either direction.Tom Lane2011-10-31
| | | | | | | | | | | The existing scan-direction-sensitive tests were overly complex, and failed to stop the scan in cases where it's perfectly legitimate to do so. Per bug #6278 from Maksym Boguk. Back-patch to 8.3, which is as far back as the patch applies easily. Doesn't seem worth sweating over a relatively minor performance issue in 8.2 at this late date. (But note that this was a performance regression from 8.1 and before, so 8.2 is being left as an outlier.)
* Fix assorted bogosities in cash_in() and cash_out().Tom Lane2011-10-29
| | | | | | | | | | | | | cash_out failed to handle multiple-byte thousands separators, as per bug #6277 from Alexander Law. In addition, cash_in didn't handle that either, nor could it handle multiple-byte positive_sign. Both routines failed to support multiple-byte mon_decimal_point, which I did not think was worth changing, but at least now they check for the possibility and fall back to using '.' rather than emitting invalid output. Also, make cash_in handle trailing negative signs, which formerly it would reject. Since cash_out generates trailing negative signs whenever the locale tells it to, this last omission represents a fail-to-reload-dumped-data bug. IMO that justifies patching this all the way back.
* Clarify that ORDER BY/FOR UPDATE can't malfunction at higher iso levels.Robert Haas2011-10-28
| | | | Kevin Grittner
* Change "and and" to "and".Robert Haas2011-10-28
| | | | Report by Vik Reykja, patch by Kevin Grittner.
* Update docs to point to the timezone library's new home at IANA.Tom Lane2011-10-27
| | | | | The recent unpleasantness with copyrights has accelerated a move that was already in planning.
* Typo fixes.Tom Lane2011-10-26
| | | | | expect -> except, noted by Andrew Dunstan. Also, "cannot" seems more readable here than "can not", per David Wheeler.
* Change FK trigger creation order to better support self-referential FKs.Tom Lane2011-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | When a foreign-key constraint references another column of the same table, row updates will queue both the PK's ON UPDATE action and the FK's CHECK action in the same event. The ON UPDATE action must execute first, else the CHECK will check a non-final state of the row and possibly throw an inappropriate error, as seen in bug #6268 from Roman Lytovchenko. Now, the firing order of multiple triggers for the same event is determined by the sort order of their pg_trigger.tgnames, and the auto-generated names we use for FK triggers are "RI_ConstraintTrigger_NNNN" where NNNN is the trigger OID. So most of the time the firing order is the same as creation order, and so rearranging the creation order fixes it. This patch will fail to fix the problem if the OID counter wraps around or adds a decimal digit (eg, from 99999 to 100000) while we are creating the triggers for an FK constraint. Given the small odds of that, and the low usage of self-referential FKs, we'll live with that solution in the back branches. A better fix is to change the auto-generated names for FK triggers, but it seems unwise to do that in stable branches because there may be client code that depends on the naming convention. We'll fix it that way in HEAD in a separate patch. Back-patch to all supported branches, since this bug has existed for a long time.
* Fix typoMagnus Hagander2011-10-25
|
* Don't trust deferred-unique indexes for join removal.Tom Lane2011-10-23
| | | | | | | | | | | The uniqueness condition might fail to hold intra-transaction, and assuming it does can give incorrect query results. Per report from Marti Raudsepp, though this is not his proposed patch. Back-patch to 9.0, where both these features were introduced. In the released branches, add the new IndexOptInfo field to the end of the struct, to try to minimize ABI breakage for third-party code that may be examining that struct.
* Fix overly-complicated usage of errcode_for_file_access().Heikki Linnakangas2011-10-22
| | | | | | | No need to do "errcode(errcode_for_file_access())", just "errcode_for_file_access()" is enough. The extra errcode() call is useless but harmless, so there's no user-visible bug here. Nevertheless, backpatch to 9.1 where this code were added.
* More cleanup after failed reduced-lock-levels-for-DDL feature.Tom Lane2011-10-21
| | | | | | | | | | | | | | | | Turns out that use of ShareUpdateExclusiveLock or ShareRowExclusiveLock to protect DDL changes had gotten copied into several places that were not touched by either of Simon's original patches for the feature, and thus neither he nor I thought to revert them. (Indeed, it appears that two of these uses were committed *after* the reversion, which just goes to show that git merging is no panacea.) Change these places to use AccessExclusiveLock again. If we ever manage to resurrect that feature, we're going to have to think a bit harder about how to keep lock level usage in sync for DDL operations that aren't within the AlterTable infrastructure. Two of these bugs are only in HEAD, but one is in the 9.1 branch too. Alvaro found one of them, I found the other two.
* Fix DROP OPERATOR FAMILY IF EXISTS.Robert Haas2011-10-21
| | | | | | | | | | Essentially, the "IF EXISTS" portion was being ignored, and an error thrown anyway if the opfamily did not exist. I broke this in commit fd1843ff8979c0461fb3f1a9eab61140c977e32d; so backpatch to 9.1.X. Report and diagnosis by KaiGai Kohei.
* Simplify and improve ProcessStandbyHSFeedbackMessage logic.Tom Lane2011-10-20
| | | | | | | | | | | | | | There's no need to clamp the standby's xmin to be greater than GetOldestXmin's result; if there were any such need this logic would be hopelessly inadequate anyway, because it fails to account for within-database versus cluster-wide values of GetOldestXmin. So get rid of that, and just rely on sanity-checking that the xmin is not wrapped around relative to the nextXid counter. Also, don't reset the walsender's xmin if the current feedback xmin is indeed out of range; that just creates more problems than we already had. Lastly, don't bother to take the ProcArrayLock; there's no need to do that to set xmin. Also improve the comments about this in GetOldestXmin itself.
* Fix memory leak in tab completion.Tom Lane2011-10-20
| | | | | This was introduced in commit e49ad77ff958b380ea6fa08c72e2dce97ac56c6b. Fixed in another, more future-proof way in HEAD.
* Document that postmaster.opts is excluded from base backupsRobert Haas2011-10-19
| | | | Fujii Masao
* Fix pg_dump to dump casts between auto-generated types.Tom Lane2011-10-18
| | | | | | | | | | | | | | The heuristic for when to dump a cast failed for a cast between table rowtypes, as reported by Frédéric Rejol. Fix it by setting the "dump" flag for such a type the same way as the flag is set for the underlying table or base type. This won't result in the auto-generated type appearing in the output, since setting its objType to DO_DUMMY_TYPE unconditionally suppresses that. But it will result in dumpCast doing what was intended. Back-patch to 8.3. The 8.2 code is rather different in this area, and it doesn't seem worth any risk to fix a corner case that nobody has stumbled on before.
* Exclude postmaster.opts from base backupsMagnus Hagander2011-10-18
| | | | Noted by Fujii Masao
* Fix collate.linux.utf8 expected output for recent error message change.Tom Lane2011-10-16
| | | | Noted by Jeff Davis.
* Fix bugs in information_schema.referential_constraints view.Tom Lane2011-10-14
| | | | | | | | | | | | | | | | This view was being insufficiently careful about matching the FK constraint to the depended-on primary or unique key constraint. That could result in failure to show an FK constraint at all, or showing it multiple times, or claiming that it depended on a different constraint than the one it really does. Fix by joining via pg_depend to ensure that we find only the correct dependency. Back-patch, but don't bump catversion because we can't force initdb in back branches. The next minor-version release notes should explain that if you need to fix this in an existing installation, you can drop the information_schema schema then re-create it by sourcing $SHAREDIR/information_schema.sql in each database (as a superuser of course).
* Fix up Perl-to-Postgres datatype conversions in pl/perl.Tom Lane2011-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch restores the pre-9.1 behavior that pl/perl functions returning VOID ignore the result value of their last Perl statement. 9.1.0 unintentionally threw an error if the last statement returned a reference, as reported by Amit Khandekar. Also, make sure it works to return a string value for a composite type, so long as the string meets the type's input format. We already allowed the equivalent behavior for arrays, so it seems inconsistent to not allow it for composites. In addition, ensure we throw errors for attempts to return arrays or hashes when the function's declared result type is not an array or composite type, respectively. Pre-9.1 versions rather uselessly returned strings like ARRAY(0x221a9a0) or HASH(0x221aa90), while 9.1.0 threw an error for the hash case and returned a garbage value for the array case. Also, clean up assorted grotty coding in Perl array conversion, including use of a session-lifespan memory context to accumulate the array value (resulting in session-lifespan memory leak on error), failure to apply the declared typmod if any, and failure to detect some cases of non-rectangular multi-dimensional arrays. Alex Hunsaker and Tom Lane
* Update documentation about ts_rank().Bruce Momjian2011-10-13
|
* Fix typo in dummy_seclabel documentation.Tom Lane2011-10-13
| | | | | | dummy_label -> dummy_seclabel Thom Brown
* Don't mark auto-generated types as extension members.Tom Lane2011-10-12
| | | | | | | | | | | | | | | | | | Relation rowtypes and automatically-generated array types do not need to have their own extension membership dependency entries. If we create such then it becomes more difficult to remove items from an extension, and it's also harder for an extension upgrade script to make sure it duplicates the dependencies created by the extension's regular installation script. I changed the code in such a way that this happened in commit 988cccc620dd8c16d77f88ede167b22056176324, I think because of worries about the shell-type-replacement case; but that cure was worse than the disease. It would only matter if one extension created a shell type that was replaced with an auto-generated type in another extension, which seems pretty far-fetched. Better to make this work unsurprisingly in normal cases. Report and patch by Robert Haas, comment adjustments by me.
* Throw a useful error message if an extension script file is fed to psql.Tom Lane2011-10-12
| | | | | | | | | | | | | | | | We have seen one too many reports of people trying to use 9.1 extension files in the old-fashioned way of sourcing them in psql. Not only does that usually not work (due to failure to substitute for MODULE_PATHNAME and/or @extschema@), but if it did work they'd get a collection of loose objects not an extension. To prevent this, insert an \echo ... \quit line that prints a suitable error message into each extension script file, and teach commands/extension.c to ignore lines starting with \echo. That should not only prevent any adverse consequences of loading a script file the wrong way, but make it crystal clear to users that they need to do it differently now. Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1 ... there is not going to be much value in this if we wait till 9.2.
* Modify up/home macro to match standard parameter list; fixes doc build.Bruce Momjian2011-10-12
|
* Improve documentation of psql's \q command.Tom Lane2011-10-12
| | | | | | The documentation neglected to explain its behavior in a script file (it only ends execution of the script, not psql as a whole), and failed to mention the long form \quit either.
* Add Up/Home link to the top of the HTML doc output.Bruce Momjian2011-10-12
| | | | Backpatch to 9.0.X and 9.1.X.
* Document that not backing up postmaster.pid and postmaster.opts mightBruce Momjian2011-10-11
| | | | | | help prevent pg_ctl from getting confused. Backpatch to 9.1.
* Improve documentation of how to fiddle with SCSI drives on FreeBSD.Robert Haas2011-10-10
| | | | Per suggestions from Achilleas Mantzios and Greg Smith.
* Fix typo in docs for libpq keepalives_count option.Robert Haas2011-10-10
| | | | Shigehiro Honda
* Revert accidental change to pg_config_manual.h.Robert Haas2011-10-09
| | | | | | | | | This was broken in commit 53dbc27c62d8e1b6c5253feba04a5094cb8fe046, which introduced unlogged tables. Fortunately, as debugging tools go, this one is pretty cheap, which is probably why it took nine months for someone to notice, but it's not intended to be enabled by default, so revert. Noted by Fujii Masao.
* Don't let transform_null_equals=on affect CASE foo WHEN NULL ... constructs.Heikki Linnakangas2011-10-08
| | | | | | | | | transform_null_equals is only supposed to affect "foo = NULL" expressions given directly by the user, not the internal "foo = NULL" expression generated from CASE-WHEN. This fixes bug #6242, reported by Sergey. Backpatch to all supported branches.
* Add missing space.Robert Haas2011-10-07
| | | | Dickson S. Guedes
* Ensure walsenders can be SIGTERMed while in non-walsender codeMagnus Hagander2011-10-06
| | | | | | | In oder to exit on SIGTERM when in non-walsender code, such as do_pg_stop_backup(), we need to set the interrupt variables that are used there, and not just the walsender local ones.
* Make pgstatindex respond to cancel interrupts.Robert Haas2011-10-06
| | | | | | | | | A similar problem for pgstattuple() was fixed in April of 2010 by commit 33065ef8bc52253ae855bc959576e52d8a28ba06, but pgstatindex() seems to have been overlooked. Back-patch all the way, as with that commit, though not to 7.4 through 8.1, since those are now EOL.
* Improve and simplify CREATE EXTENSION's management of GUC variables.Tom Lane2011-10-05
| | | | | | | | | | | | | | | | | | | | | CREATE EXTENSION needs to transiently set search_path, as well as client_min_messages and log_min_messages. We were doing this by the expedient of saving the current string value of each variable, doing a SET LOCAL, and then doing another SET LOCAL with the previous value at the end of the command. This is a bit expensive though, and it also fails badly if there is anything funny about the existing search_path value, as seen in a recent report from Roger Niederland. Fortunately, there's a much better way, which is to piggyback on the GUC infrastructure previously developed for functions with SET options. We just open a new GUC nesting level, do our assignments with GUC_ACTION_SAVE, and then close the nesting level when done. This automatically restores the prior settings without a re-parsing pass, so (in principle anyway) there can't be an error. And guc.c still takes care of cleanup in event of an error abort. The CREATE EXTENSION code for this was modeled on some much older code in ri_triggers.c, which I also changed to use the better method, even though there wasn't really much risk of failure there. Also improve the comments in guc.c to reflect this additional usage.
* Add sourcefile/sourceline data to EXEC_BACKEND GUC transmission files.Tom Lane2011-10-04
| | | | | | | | | | This oversight meant that on Windows, the pg_settings view would not display source file or line number information for values coming from postgresql.conf, unless the backend had received a SIGHUP since starting. In passing, also make the error detection in read_nondefault_variables a tad more thorough, and fix it to not lose precision on float GUCs (these changes are already in HEAD as of my previous commit).
* ProcedureCreate neglected to record dependencies on default expressions.Tom Lane2011-10-03
| | | | | | | Thus, an object referenced in a default expression could be dropped while the function remained present. This was unaccountably missed in the original patch to add default parameters for functions. Reported by Pavel Stehule.
* Fix pg_upgrade for EXEC_BACKEND builds (e.g. Windows) by properlyBruce Momjian2011-09-29
| | | | | | passing the -b/binary-upgrade flag. Backpatch to 9.1.X.
* Fix index matching for operators with mixed collatable/noncollatable inputs.Tom Lane2011-09-29
| | | | | | | | | | | | | | | | | If an indexable operator for a non-collatable indexed datatype has a collatable right-hand input type, any OpExpr for it will be marked with a nonzero inputcollid (since having one collatable input is sufficient to make that happen). However, an index on a non-collatable column certainly doesn't have any collation. This caused us to fail to match such operators to their indexes, because indxpath.c required an exact match of index collation and clause collation. It seems correct to allow a match when the index is collation-less regardless of the clause's inputcollid: an operator with both noncollatable and collatable inputs could perhaps depend on the collation of the collatable input, but it could hardly expect the index for the noncollatable input to have that same collation. Per bug #6232 from Pierre Ducroquet. His example is specifically about "hstore ? text" but the problem seems quite generic.
* In pg_upgrade, because toast table names can be mismatched with the heapBruce Momjian2011-09-28
| | | | | oid on 8.4, modify the toast name comparison test to only apply to old 9.0+ servers. (The test was previously 8.4+.)
* Take sepgsql regression tests out of the regular regression test mechanism.Tom Lane2011-09-27
| | | | | Back-port the new "test_sepgsql" script into 9.1 to provide a substitute test mechanism.
* Fix window functions that sort by expressions involving aggregates.Tom Lane2011-09-26
| | | | | | | | | | | | | | | | | | | | | | | In commit c1d9579dd8bf3c921ca6bc2b62c40da6d25372e5, I changed things so that the output of the Agg node that feeds the window functions would not list any ungrouped Vars directly. Formerly, for example, the Agg tlist might have included both "x" and "sum(x)", which is not really valid if "x" isn't a grouping column. If we then had a window function ordering on something like "sum(x) + 1", prepare_sort_from_pathkeys would find no exact match for this in the Agg tlist, and would conclude that it must recompute the expression. But it would break the expression down to just the Var "x", which it would find in the tlist, and then rebuild the ORDER BY expression using a reference to the subplan's "x" output. Now, after the above-referenced changes, "x" isn't in the Agg tlist if it's not a grouping column, so that prepare_sort_from_pathkeys fails with "could not find pathkey item to sort", as reported by Bricklen Anderson. The fix is to not break down Aggrefs into their component parts, but just treat them as irreducible expressions to be sought in the subplan tlist. This is definitely OK for the use with respect to window functions in grouping_planner, since it just built the tlist being used on the same basis. AFAICT it is safe for other uses too; most of the other call sites couldn't encounter Aggrefs anyway.
* Un-break compression of plain-text output format in pg_dump.Tom Lane2011-09-25
| | | | | | | | | pg_dump has historically understood -Z with no -F switch to mean that it should emit a gzip-compressed version of its plain text output. This got broken through a misunderstanding in the 9.1 patch that added directory output format. Restore the former behavior. Per complaint from Roger Niederland and diagnosis by Adrian Klaver.
* Fix typoMagnus Hagander2011-09-24
|
* Note that sslmode=require verifies the CA if root cert is presentMagnus Hagander2011-09-24
| | | | | | | | This mode still exists for backwards compatibility, making sslmode=require the same as sslmode=verify-ca when the file is present, but not causing an error when it isn't. Per bug 6189, reported by Srinivas Aji
* Fix our mapping of Windows timezones for Central America.Tom Lane2011-09-23
| | | | | | | | | | | | | | | | | | | We were mapping "Central America Standard Time" to "CST6CDT", which seems entirely wrong, because according to the Olson timezone database noplace in Central America observes daylight savings time on any regular basis --- and certainly not according to the USA DST rules that are implied by "CST6CDT". (Mexico is an exception, but they can be disregarded since they have a separate timezone name in Windows.) So, map this zone name to plain "CST6", which will provide a fixed UTC offset. As written, this patch will also result in mapping "Central America Daylight Time" to CST6. I considered hacking things so that would still map to CST6CDT, but it seems it would confuse win32tzlist.pl to put those two names in separate entries. Since there's little evidence that any such zone name is used in the wild, much less that CST6CDT would be a good match for it, I'm not too worried about what we do with it. Per complaint from Pratik Chirania.
* synchronous_commit is an enum not a boolean.Simon Riggs2011-09-23
| | | | Jaime Casanova
* Stamp 9.1.1.REL9_1_1Tom Lane2011-09-22
|