pgsql: psql: Add documentation URL to \help output

2019-03-11 Thread Peter Eisentraut
psql: Add documentation URL to \help output Add a link to the specific command's reference web page to the bottom of its \help output. Discussion: https://www.postgresql.org/message-id/flat/40179bd0-fa7d-4108-1991-a20ae9ad5667%402ndquadrant.com Branch -- master Details --- https://git.

pgsql: Remove unused macro

2019-03-11 Thread Peter Eisentraut
Remove unused macro Use was removed in 25ca5a9a54923a5d6746f771c4c23e85a195bde5. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3c067154471100ae691d1a7b2659ee439ab7b96d Modified Files -- src/backend/utils/adt/tsvector_op.c | 2 -- 1 file changed, 2 dele

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/72f725ab25bdf4ad12c9586521935eb9307fcfe1 Modified Files -- src/interfaces

pgsql: Fix ecpglib regression that made it impossible to close a cursor

2019-03-11 Thread Michael Meskes
Fix ecpglib regression that made it impossible to close a cursor that was opened in a prepared statement. Patch by: "Kuroda, Hayato" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/98bdaab0d918169a36d64a06667a809c673ec065 Modified Files -- src/interfac

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/08cecfaf60c484f219ba7e6ee23e9699aea4e9af Modified Files -- src/interfaces/ecpg/p

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5469a1e78c92a3ce9ed232583273c53223e83b63 Modified Files -- src/interfaces

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7adda86ba9c8dc1d0db07d0049ccfff42082a0e Modified Files -- src/interfaces

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7e78f1598281a7543be563fb19c79b99826c943 Modified Files -- src/interfaces

pgsql: In guc.c, ignore ERANGE errors from strtod().

2019-03-11 Thread Tom Lane
In guc.c, ignore ERANGE errors from strtod(). Instead, just proceed with the infinity or zero result that it should return for overflow/underflow. This avoids a platform dependency, in that various versions of strtod are inconsistent about whether they signal ERANGE for a value that's specified a

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8cdce0a455ff885e99d672dbd8edbd217d68139f Modified Files -- src/interfaces

pgsql: Move hash_any prototype from access/hash.h to utils/hashutils.h

2019-03-11 Thread Alvaro Herrera
Move hash_any prototype from access/hash.h to utils/hashutils.h ... as well as its implementation from backend/access/hash/hashfunc.c to backend/utils/hash/hashfn.c. access/hash is the place for the hash index AM, not really appropriate for generic facilities, which is what hash_any is; having th

pgsql: Fix typos in commit 8586bf7ed8.

2019-03-11 Thread Andres Freund
Fix typos in commit 8586bf7ed8. Author: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1KNv1Mg2krf4E9ssWFnE=8a9mz1vbvywxbztfszb+w...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a6e48da08844eeb5a72c8b59dad3aaab6e891fac Author: Amit Kapila Mod

Re: pgsql: tableam: introduce table AM infrastructure.

2019-03-11 Thread Andres Freund
On 2019-03-11 08:21:21 +0530, Amit Kapila wrote: > I noticed a few typos in this commit. The patch for the same is > attached. Merged, thanks!

pgsql: pgbench: increase the maximum number of variables/arguments

2019-03-11 Thread Andrew Dunstan
pgbench: increase the maximum number of variables/arguments pgbench's arbitrary limit of 10 arguments for SQL statements or metacommands is far too low. Increase it to 256. This results in a very modest increase in memory usage, not enough to worry about. The maximum includes the SQL statement o

pgsql: tableam: Add and use scan APIs.

2019-03-11 Thread Andres Freund
tableam: Add and use scan APIs. Too allow table accesses to be not directly dependent on heap, several new abstractions are needed. Specifically: 1) Heap scans need to be generalized into table scans. Do this by introducing TableScanDesc, which will be the "base class" for individual AMs. T

Re: pgsql: tableam: Add and use scan APIs.

2019-03-11 Thread Andres Freund
Hi, On 2019-03-11 20:00:30 +, Andres Freund wrote: > tableam: Add and use scan APIs. Quick note: I'm already looking at the 32bit failure - I've described the issue in https://postgr.es/m/20190311203126.ty5gbfz42gjbm6i6%40alap3.anarazel.de Greetings, Andres Freund

pgsql: Ensure sufficient alignment for ParallelTableScanDescData in BTS

2019-03-11 Thread Andres Freund
Ensure sufficient alignment for ParallelTableScanDescData in BTShared. Previously ParallelTableScanDescData was just a member in BTShared, but after c2fe139c2 that doesn't guarantee sufficient alignment as specific AMs might (are likely to) need atomic variables in the struct. One might think tha

pgsql: Give up on testing guc.c's behavior for "infinity" inputs.

2019-03-11 Thread Tom Lane
Give up on testing guc.c's behavior for "infinity" inputs. Further buildfarm testing shows that on the machines that are failing ac75959cd's test case, what we're actually getting from strtod("-infinity") is a syntax error (endptr == value) not ERANGE at all. This test case is not worth carrying

pgsql: Remove spurious return.

2019-03-11 Thread Andres Freund
Remove spurious return. Per buildfarm member anole. Author: Andres Freund Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/32b8f0b0332ef96c67f06ded4d458a3ce12fe2ef Modified Files -- src/include/access/tableam.h | 2 +- 1 file changed, 1 insertion(+), 1 d

pgsql: Document incompatibility of comparison expressions with VARIADIC

2019-03-11 Thread Andrew Dunstan
Document incompatibility of comparison expressions with VARIADIC array arguments COALESCE, GREATEST and LEAST all look like functions taking variable numbers of arguments, but in fact they are not functions, and so VARIADIC array arguments don't work with them. Add a note to the docs explaining th

pgsql: Tweak wording on VARIADIC array doc patch.

2019-03-11 Thread Andrew Dunstan
Tweak wording on VARIADIC array doc patch. Per suggestion from Tom Lane. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fe0b2c12c992fa44ca0448bde9099957306c843f Modified Files -- doc/src/sgml/func.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

pgsql: Allow fractional input values for integer GUCs, and improve roun

2019-03-11 Thread Tom Lane
Allow fractional input values for integer GUCs, and improve rounding logic. Historically guc.c has just refused examples like set work_mem = '30.1GB', but it seems more useful for it to take that and round off the value to some reasonable approximation of what the user said. Just rounding to the

pgsql: Add routine able to update the control file to src/common/

2019-03-11 Thread Michael Paquier
Add routine able to update the control file to src/common/ This adds a new routine to src/common/ which is compatible with both the frontend and backend code, able to update the control file's contents. This is now getting used only by pg_rewind, but some upcoming patches which add more control on

pgsql: Add more tests for FSM.

2019-03-11 Thread Amit Kapila
Add more tests for FSM. In commit b0eaa4c51bb, we left out a test that used a vacuum to remove dead rows as the behavior of test was not predictable. This test has been rewritten to use fillfactor instead to control free space. Since we no longer need to remove dead rows as part of the test, put