- 03 Feb, 2016 9 commits
-
-
Robert Haas authored
This patch doesn't put the new infrastructure to use anywhere, and indeed it's not clear how it could ever be used for something like postgres_fdw which has to send an SQL query and wait for a reply, but there might be FDWs or custom scan providers that are CPU-bound, so let's give them a way to join club parallel. KaiGai Kohei, reviewed by me.
-
Peter Eisentraut authored
Commit 7d17e683 introduced an external link.
-
Tom Lane authored
Commit e09996ff removed some ad-hoc code in hstore_to_json_loose that determined whether an hstore value string looked like a number, in favor of calling the JSON parser's is-it-a-number code. However, it neglected the fact that the exact same code appeared in hstore_to_jsonb_loose. This is not a bug, exactly, because the requirements on the two functions are not the same: hstore_to_json_loose must accept only syntactically legal JSON numbers as numbers, or it will produce invalid JSON output, as per bug #12070 which spawned the prior commit. But hstore_to_jsonb_loose could accept anything that numeric_in will eat, other than Inf and NaN. Nonetheless it seems surprising and arbitrary that the two functions don't use the same rules for what is a number versus what is a string; especially since they did use the same rules before the aforesaid commit. For one thing, that means that doing hstore_to_json_loose and then casting to jsonb can produce results different from doing just hstore_to_jsonb_loose. Hence, change hstore_to_jsonb_loose's logic to match hstore_to_json_loose, ie, hstore values are treated as numbers when they match the JSON syntax for numbers. No back-patch, since this is more in the nature of a definitional change than a bug fix.
-
Robert Haas authored
Remove duplicate assignment. This part by Ashutosh Bapat. Remove now-obsolete comment. This part by me, although the pending join pushdown patch does something similar, and for the same reason: there's no reason to keep two lists of the things in the fdw_private structure that have to be kept in sync with each other.
-
Robert Haas authored
You can't really do anything useful with this in the form it currently exists; among other problems, there's no way to reread whatever information might be produced when the path is output. Work is underway to replace this with a more useful and more general system of extensible nodes, but let's start by getting rid of this bit. Extracted from a larger patch by KaiGai Kohei.
-
Robert Haas authored
The default fetch size of 100 rows might not be right in every environment, so allow users to configure it. Corey Huinker, reviewed by Kyotaro Horiguchi, Andres Freund, and me.
-
Tom Lane authored
Commit e09996ff was one brick shy of a load: it didn't insist that the detected JSON number be the whole of the supplied string. This allowed inputs such as "2016-01-01" to be misdetected as valid JSON numbers. Per bug #13906 from Dmitry Ryabov. In passing, be more wary of zero-length input (I'm not sure this can happen given current callers, but better safe than sorry), and do some minor cosmetic cleanup.
-
Peter Eisentraut authored
Insert sd_notify() calls at server start and stop for integration with systemd. This allows the use of systemd service units of type "notify", which greatly simplifies the systemd configuration. Reviewed-by: Pavel Stěhule <pavel.stehule@gmail.com>
-
Peter Eisentraut authored
Previously, the first error seen would be that postgresql.conf does not exist. But for the case where the whole directory does not exist, give an error message about that, together with a hint for how to create one.
-
- 02 Feb, 2016 7 commits
-
-
Alvaro Herrera authored
create_foreignscan_plan needs to know whether any system columns are requested from a relation (this flag is needed by ForeignNext during execution). However, for join relations this is a pointless test, because it's not possible to request system columns from them, so remove the check. Author: Etsuro Fujita Discussion: http://www.postgresql.org/message-id/56AA0FC5.9000207@lab.ntt.co.jp Reviewed-by: David Rowley, Robert Haas
-
Tom Lane authored
Apparently at least one committer hasn't gotten the word that these do not need to be maintained by hand, since initdb will create them automatically. Noted while fixing bug #13905. No catversion bump since the post-initdb state is exactly the same either way. I don't see a need for back-patch, either.
-
Tom Lane authored
All the other jsonb function descriptions refer to the arguments as being "jsonb", but these two said "json". Make it consistent. Per bug #13905 from Petru Florin Mihancea. No catversion bump --- we can't force one in the back branches, and this isn't very critical anyway.
-
Magnus Hagander authored
-
Teodor Sigaev authored
KNN GiST with recheck flag should return to executor the same type as ordering operator, GiST detects this type by looking to return type of function which implements ordering operator. But occasionally detecting code works after replacing ordering operator function to distance support function. Distance support function always returns float8, so, detecting code get float8 instead of actual return type of ordering operator. Built-in opclasses don't have ordering operator which doesn't return non-float8 value, so, tests are impossible here, at least now. Backpatch to 9.5 where lozzy KNN was introduced. Author: Alexander Korotkov Report by: Artur Zakirov
-
Robert Haas authored
This makes the values more stable, which seems like a good thing for anybody who needs to look at at them. Alexander Korotkov and Amit Kapila
- 01 Feb, 2016 6 commits
-
-
Alvaro Herrera authored
Provide per-script statistical info (count of transactions executed under that script, average latency for the whole script) after a multi-script run, adding an intermediate level of detail to existing global stats and per-command stats. Author: Fabien Coelho Reviewer: Michaël Paquier, Álvaro Herrera
-
Robert Haas authored
Dividing INT_MIN by -1 or taking INT_MIN modulo -1 can sometimes cause floating-point exceptions or otherwise misbehave. Fabien Coelho and Michael Paquier
-
Fujii Masao authored
Add - ALTER SYSTEM SET/RESET ... -> GUC variables - ALTER TABLE ... SET WITH -> OIDS - ALTER DATABASE/FUNCTION/ROLE/USER ... SET/RESET -> GUC variables - ALTER DATABASE/FUNCTION/ROLE/USER ... SET ... -> FROM CURRENT/TO - ALTER DATABASE/FUNCTION/ROLE/USER ... SET ... TO/= -> possible values Author: Fujii Masao Reviewed-by: Michael Paquier, Masahiko Sawada
-
Michael Meskes authored
which is a preprocessor directive. This leads ecpg to incorrectly parse the comment as nested.
-
Magnus Hagander authored
Author: Michael Paquier
-
Heikki Linnakangas authored
-
- 31 Jan, 2016 1 commit
-
-
Andrew Dunstan authored
Error reported by Igal Sapir.
-
- 30 Jan, 2016 2 commits
-
-
Peter Eisentraut authored
-
Robert Haas authored
The code that generates a complete SQL query for a given foreign relation was repeated in two places, and they didn't quite agree: the EXPLAIN case left out the locking clause. Centralize the code so we get the same behavior everywhere, and adjust calling conventions and which functions are static vs. extern accordingly . Centralize the code so we get the same behavior everywhere, and adjust calling conventions and which functions are static vs. extern accordingly. Ashutosh Bapat, reviewed and slightly adjusted by me.
-
- 29 Jan, 2016 5 commits
-
-
Robert Haas authored
This is following in a long train of similar changes and for the same reasons - see b319356f and fe702a7b inter alia. Author: Amit Kapila Reviewed-by: Alexander Korotkov, Robert Haas
-
Robert Haas authored
Previously, each PGPROC's backendLock was part of the main tranche, and the PGPROC just contained a pointer. Now, the actual LWLock is part of the PGPROC. As with previous, similar patches, this makes it significantly easier to identify these lwlocks in LWLOCK_STATS or Trace_lwlocks output and improves modularity. Author: Ildus Kurbangaliev Reviewed-by: Amit Kapila, Robert Haas
-
Alvaro Herrera authored
This doesn't add any functionality but just shuffles things around so that it can be reused and improved later. Author: Fabien Coelho Reviewed-by: Michael Paquier, Álvaro Herrera
-
Tom Lane authored
listForeignTables' invocation of processSQLNamePattern did not match up with the other ones that handle potentially-schema-qualified names; it failed to make use of pg_table_is_visible() and also passed the name arguments in the wrong order. Bug seems to have been aboriginal in commit 0d692a0d. It accidentally sort of worked as long as you didn't inquire too closely into the behavior, although the silliness was later exposed by inconsistencies in the test queries added by 59efda3e (which I probably should have questioned at the time, but didn't). Per bug #13899 from Reece Hart. Patch by Reece Hart and Tom Lane. Back-patch to all affected branches.
-
Fujii Masao authored
Patch-by: Oleksandr Shulgin Reviewed-by: Craig Ringer and Fujii Masao Backpatch-through: 9.4 where logical decoding was introduced
-
- 28 Jan, 2016 10 commits
-
-
Robert Haas authored
The upcoming patch to allow join pushdown in postgres_fdw needs to use this code multiple times, which requires moving it to deparse.c. That seems like a good idea anyway, so do that now both on general principle and to simplify the future patch. Inspired by a patch by Shigeru Hanada and Ashutosh Bapat, but I did it a little differently than what that patch did.
-
Robert Haas authored
Previously, the foreign join pushdown infrastructure left the question of security entirely up to individual FDWs, but it would be easy for a foreign data wrapper to inadvertently open up subtle security holes that way. So, make it the core code's job to determine which user mapping OID is relevant, and don't attempt join pushdown unless it's the same for all relevant relations. Per a suggestion from Tom Lane. Shigeru Hanada and Ashutosh Bapat, reviewed by Etsuro Fujita and KaiGai Kohei, with some further changes by me.
-
Robert Haas authored
This fix accidentally got left out of the previous commit.
-
Robert Haas authored
Previously, postgres_fdw's connection cache was keyed by user OID and server OID, but this can lead to multiple connections when it's not really necessary. In particular, if all relevant users are mapped to the public user mapping, then their connection options are certainly the same, so one connection can be used for all of them. While we're cleaning things up here, drop the "server" argument to GetConnection(), which isn't really needed. This saves a few cycles because callers no longer have to look this up; the function itself does, but only when establishing a new connection, not when reusing an existing one. Ashutosh Bapat, with a few small changes by me.
-
Robert Haas authored
Patch-by: Filip Rembiałkowski Reviewed-by: Robert Haas Backpatch-through: 9.5
-
Alvaro Herrera authored
The documentation mentioned contrib/ but the module was moved to src/test/modules/ by commit 22dfd116 of 9.5 era. Problem pointed out by Dickson Guedes in bug #13896 Backpatch-to: 9.5.
-
Fujii Masao authored
overriden -> overridden The misspelling in create_extension.sgml was introduced in b67aaf21, so no need to backpatch.
-
Fujii Masao authored
This function cleans up the pending list of the GIN index by moving entries in it to the main GIN data structure in bulk. It returns the number of pages cleaned up from the pending list. This function is useful, for example, when the pending list needs to be cleaned up *quickly* to improve the performance of the search using GIN index. VACUUM can do the same thing, too, but it may take days to run on a large table. Jeff Janes, reviewed by Julien Rouhaud, Jaime Casanova, Alvaro Herrera and me. Discussion: CAMkU=1x8zFkpfnozXyt40zmR3Ub_kHu58LtRmwHUKRgQss7=iQ@mail.gmail.com
-
Robert Haas authored
Per off-list discussion with Tom Lane and Michael Paquier, Coverity gets unhappy if this is not done.
-
Robert Haas authored
Fixes a defect in commit a7de3dc5. David Rowley, per report from Jeff Janes, who also checked that the fix works.
-