- 18 Jul, 2014 2 commits
-
-
Noah Misch authored
~/.pgpass is a sound choice everywhere, and "peer" authentication is safe on every platform it supports. Cease to recommend "trust" authentication, the safety of which is deeply configuration-specific. Back-patch to 9.0, where pg_upgrade was introduced.
-
Tom Lane authored
If pg_regcomp failed after having invoked markst/cleanst, it would leak any "struct subre" nodes it had created. (We've already detected all regex syntax errors at that point, so the only likely causes of later failure would be query cancel or out-of-memory.) To fix, make sure freesrnode knows the difference between the pre-cleanst and post-cleanst cleanup procedures. Add some documentation of this less-than-obvious point. Also, newlacon did the wrong thing with an out-of-memory failure from realloc(), so that the previously allocated array would be leaked. Both of these are pretty low-probability scenarios, but a bug is a bug, so patch all the way back. Per bug #10976 from Arthur O'Dwyer.
-
- 17 Jul, 2014 3 commits
-
-
Magnus Hagander authored
pgevent doesn't include the global PostgreSQL headers, for a reason, and therefor cannot rely on defines in it...
-
Magnus Hagander authored
pg_ctl will log to the Windows event log when it is running as a service, which is the primary way of running PostgreSQL on Windows. This option makes it possible to specify which event source to use for this, in order to separate different instances. The server logging itself is still controlled by the regular logging parameters, including a separate setting for the event source. The parameter to pg_ctl only controlls the logging from pg_ctl itself. MauMau, review in many iterations by Amit Kapila and me.
-
Peter Eisentraut authored
-
- 16 Jul, 2014 2 commits
-
-
Heikki Linnakangas authored
The consistent function contained several bugs: * The "if (which2) { ... }" block was broken. It compared the argument's lower bound against centroid's upper bound, while it was supposed to compare the argument's upper bound against the centroid's lower bound (the comment was correct, code was wrong). Also, it cleared bits in the "which1" variable, while it was supposed to clear bits in "which2". * If the argument's upper bound was equal to the centroid's lower bound, we descended to both halves (= all quadrants). That's unnecessary, searching the right quadrants is sufficient. This didn't lead to incorrect query results, but was clearly wrong, and slowed down queries unnecessarily. * In the case that argument's lower bound is adjacent to the centroid's upper bound, we also don't need to visit all quadrants. Per similar reasoning as previous point. * The code where we compare the previous centroid with the current centroid should match the code where we compare the current centroid with the argument. The point of that code is to redo the calculation done in the previous level, to see if we were supposed to traverse left or right (or up or down), and if we actually did. If we moved in the different direction, then we know there are no matches for bound. Refactor the code and adds comments to make it more readable and easier to reason about. Backpatch to 9.3 where SP-GiST support for range types was introduced.
-
Tom Lane authored
We can remove a left join to a relation if the relation's output is provably distinct for the columns involved in the join clause (considering only equijoin clauses) and the relation supplies no variables needed above the join. Previously, the join removal logic could only prove distinctness by reference to unique indexes of a table. This patch extends the logic to consider subquery relations, wherein distinctness might be proven by reference to GROUP BY, DISTINCT, etc. We actually already had some code to check that a subquery's output was provably distinct, but it was hidden inside pathnode.c; which was a pretty bad place for it really, since that file is mostly boilerplate Path construction and comparison. Move that code to analyzejoins.c, which is arguably a more appropriate location, and is certainly the site of the new usage for it. David Rowley, reviewed by Simon Riggs
-
- 15 Jul, 2014 14 commits
-
-
Magnus Hagander authored
Mingw uses a different header file than msvc, so we don't get the hardcoded value, so we need the configure test to run.
-
Peter Eisentraut authored
-
Peter Eisentraut authored
-
Peter Eisentraut authored
It was previously not clear what unit the option argument should have.
-
Andrew Dunstan authored
These functions indirectly invoke output functions, so they can't be immutable. Backpatch to 9.4 where they were introduced. Catalog version bumped.
-
Alvaro Herrera authored
Per note from Tom Lane
-
Alvaro Herrera authored
Trying to reassign objects owned by a user that had text search dictionaries or configurations used to fail with: ERROR: unexpected classid 3600 or ERROR: unexpected classid 3602 Fix by adding cases for those object types in a switch in pg_shdepend.c. Both REASSIGN OWNED and text search objects go back all the way to 8.1, so backpatch to all supported branches. In 9.3 the alter-owner code was made generic, so the required change in recent branches is pretty simple; however, for 9.2 and older ones we need some additional reshuffling to enable specifying objects by OID rather than name. Text search templates and parsers are not owned objects, so there's no change required for them. Per bug #9749 reported by Michal Novotný
-
Magnus Hagander authored
Apparently we still build against OpenSSL so old that it doesn't have this function, so add an autoconf check for it to make the buildfarm happy. If the function doesn't exist, always return that compression is disabled, since presumably the actual compression functionality is always missing. For now, hardcode the function as present on MSVC, since we should hopefully be well beyond those old versions on that platform.
-
Peter Eisentraut authored
These are files under common/ that have been moved around. Updating these manually is not satisfactory, but it's the only solution at the moment.
-
Magnus Hagander authored
Both the psql banner and the connection logging already included SSL status, cipher and bitlength, this adds the information about compression being on or off.
-
Peter Eisentraut authored
-
Peter Eisentraut authored
Also update one place where the wal_level "logical" was not added to an error message.
-
Magnus Hagander authored
ws2_32 is the new version of the library that should be used, as it contains the require functionality from wsock32 as well as some more (which is why some binaries were already using ws2_32). Michael Paquier, reviewed by MauMau
-
Peter Eisentraut authored
From: Josh Kupershmidt <schmiddy@gmail.com>
-
- 14 Jul, 2014 10 commits
-
-
Alvaro Herrera authored
Fabrízio de Royes Mello
-
Alvaro Herrera authored
Per discussion after a gripe from me in http://www.postgresql.org/message-id/20140611194633.GH18688@eldon.alvh.no-ip.org Jaime Casanova
-
Noah Misch authored
Prominent binaries already had this metadata. A handful of minor binaries, such as pg_regress.exe, still lack it; efforts to eliminate such exceptions are welcome. Michael Paquier, reviewed by MauMau.
-
Noah Misch authored
Michael Paquier
-
Noah Misch authored
-
Noah Misch authored
Unlike "make" itself, the MSVC build process recognized a continuation even with whitespace after the backslash. (Due to a typo, some code sites accepted the letter "s" instead of whitespace). Also, it would consume any number of newlines following a single backslash. This is mere cleanup; those behaviors were unlikely to cause bugs.
-
Noah Misch authored
Achieve this by consistently using four-argument Solution::AddProject() calls. Remove ad hoc Makefile parsing made redundant by doing that. Michael Paquier and Noah Misch, reviewed by MauMau.
-
Noah Misch authored
-
Fujii Masao authored
EXPLAIN ANALYZE shows the information of the numbers of exact/lossy blocks which bitmap heap scan processes. But, previously, when those numbers were both zero, it displayed only the prefix "Heap Blocks:" in TEXT output format. This is strange and would confuse the users. So this commit suppresses such unnecessary information. Backpatch to 9.4 where EXPLAIN ANALYZE was changed so that such information was displayed. Etsuro Fujita
-
Fujii Masao authored
Etsuro Fujita
-
- 12 Jul, 2014 4 commits
-
-
Magnus Hagander authored
Adds a configuration parameter, extraver, that is appended to the version number when built. Michael Paquier, reviewed by Muhammad Asif Naeem
-
Andres Freund authored
Complete SET search_path = ... to non-temporary and non-toast schemas. Since there pretty much is no use case to add those to the search path and there can be many it's helpful to exclude them. It'd be nicer to complete multiple search path elements, but that's not easy. Jeff Janes
-
Andres Freund authored
Commit 1b86c81d fixed the decoding of toasted columns for the rows contained in one xl_heap_multi_insert record. But that's not actually enough, because heap_multi_insert() will actually first toast all passed in rows and then emit several *_multi_insert records; one for each page it fills with tuples. Add a XLOG_HEAP_LAST_MULTI_INSERT flag which is set in xl_heap_multi_insert->flag denoting that this multi_insert record is the last emitted by one heap_multi_insert() call. Then use that flag in decode.c to only set clear_toast_afterwards in the right situation. Expand the number of rows inserted via COPY in the corresponding regression test to make sure that more than one heap page is filled with tuples by one heap_multi_insert() call. Backpatch to 9.4 like the previous commit.
-
Magnus Hagander authored
Adds support for autocomplete of LC_COLLATE and LC_CTYPE to the CREATE DATABASE command in psql.
-
- 11 Jul, 2014 2 commits
-
-
Tom Lane authored
ExecEvalWholeRowVar incorrectly supposed that it could "bless" the source TupleTableSlot just once per query. But if the input is coming from an Append (or, perhaps, other cases?) more than one slot might be returned over the query run. This led to "record type has not been registered" errors when a composite datum was extracted from a non-blessed slot. This bug has been there a long time; I guess it escaped notice because when dealing with subqueries the planner tends to expand whole-row Vars into RowExprs, which don't have the same problem. It is possible to trigger the problem in all active branches, though, as illustrated by the added regression test.
-
Peter Eisentraut authored
-
- 10 Jul, 2014 3 commits
-
-
Tom Lane authored
This command provides an automated way to create foreign table definitions that match remote tables, thereby reducing tedium and chances for error. In this patch, we provide the necessary core-server infrastructure and implement the feature fully in the postgres_fdw foreign-data wrapper. Other wrappers will throw a "feature not supported" error until/unless they are updated. Ronan Dunklau and Michael Paquier, additional work by me
-
Bruce Momjian authored
Report by Robert Haas
-
Fujii Masao authored
When the psql variable ECHO is set to 'erros', only failed SQL commands are printed to standard error output. Also this patch adds -b option into psql. This is equivalent to setting the variable ECHO to 'errors'. Pavel Stehule, reviewed by Fabrízio de Royes Mello, Samrat Revagade, Kumar Rajeev Rastogi, Abhijit Menon-Sen, and me.
-