- 02 Feb, 2016 3 commits
-
-
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.
-
- 27 Jan, 2016 3 commits
-
-
Fujii Masao authored
pg_size_pretty function should be marked immutable rather than volatile because it always returns the same result given the same argument. Pavel Stehule
-
Alvaro Herrera authored
Previously, it was possible to specify one or several custom scripts to run, or only one of the builtin scripts. With this patch it is also possible to specify to run the builtin scripts multiple times, using the new -b option. Also, unify the code for both cases; this eases future pgbench improvements. Author: Fabien Coelho Review: Michaël Paquier, Álvaro Herrera
-
Alvaro Herrera authored
pgindent for recent commits; also change some variables from int to boolean, which is how they are really used. Mostly submitted by Fabien Coelho; this is in preparation to commit further patches to the file.
-
- 26 Jan, 2016 3 commits
-
-
Tom Lane authored
We entirely randomly chose to initialize port->remote_host just after printing the log_connections message, when we could perfectly well do it just before, allowing %h and %r to work for that message. Per gripe from Artem Tomyuk.
-
Tom Lane authored
The original coding was quite fast so long as objects were always released in reverse order of addition; otherwise, it degenerated into O(N^2) behavior due to searching for the array element to delete. Improve matters by switching to hashed storage when the number of objects of a given type exceeds 64. (The cutover point is open to discussion, of course, but some simple performance testing suggests that hashing has enough overhead to be a loser below there.) Also, refactor resowner.c so that we don't need N copies of the array management code. Since all the resource IDs the code currently needs to deal with are either pointers or integers, it seems sufficient to create a one-size-fits-all infrastructure in which everything is converted to a Datum for storage. Aleksander Alekseev, reviewed by Stas Kelvich, further fixes by me
-
Kevin Grittner authored
Masahiko Sawada, Fujii Masao, Kevin Grittner
-
- 25 Jan, 2016 1 commit
-
-
Tatsuo Ishii authored
This reverts commit efc1610b. The commit was plain wrong as pointed out in: http://www.postgresql.org/message-id/27771.1448736909@sss.pgh.pa.us
-
- 24 Jan, 2016 2 commits
-
-
Simon Riggs authored
We use Share lock because it is safe to do so.
-
Tom Lane authored
Buildfarm member cockatiel is still saying that cosd(60) isn't 0.5. What seems likely is that the subexpression (1.0 - cos(x)) isn't being rounded to double width before more arithmetic is done on it, so force that by storing it into a variable.
-
- 23 Jan, 2016 4 commits
-
-
Tom Lane authored
Indeed, the non-static declaration foreseen in my previous commit message is necessary. Per Noah Misch.
-
Tom Lane authored
The last round didn't do it. Per Noah Misch, the problem on at least some machines is that the compiler pre-evaluates trig functions having constant arguments using code slightly different from what will be used at runtime. Therefore, we must prevent the compiler from seeing constant arguments to any of the libm trig functions used in this code. The method used here might still fail if init_degree_constants() gets inlined into the call sites. That probably won't happen given the large number of call sites; but if it does, we could probably fix it by making init_degree_constants() non-static. I'll avoid that till proven necessary, though.
-
Tom Lane authored
The buildfarm isn't very happy with the results of commit e1bd684a. To try to get the expected exact results everywhere: * Replace M_PI / 180 subexpressions with a precomputed constant, so that the compiler can't decide to rearrange that division with an adjacent operation. Hopefully this will fix failures to get exactly 0.5 from sind(30) and cosd(60). * Add scaling to ensure that tand(45) and cotd(45) give exactly 1; there was nothing particularly guaranteeing that before. * Replace minus zero by zero when tand() or cotd() would output that; many machines did so for tand(180) and cotd(270), but not all. We could alternatively deem both results valid, but that doesn't seem likely to be what users will want.
-
Peter Eisentraut authored
Add - ALTER FOREIGN DATA WRAPPER -> RENAME TO - ALTER SERVER -> RENAME TO - ALTER SERVER ... VERSION ... -> OPTIONS - CREATE FOREIGN DATA WRAPPER -> OPTIONS - CREATE SERVER -> OPTIONS - CREATE|ALTER USER MAPPING -> OPTIONS From: Andreas Karlsson <andreas@proxel.se>
-