pgsql: Constify dsa_size_class_map and use a better type.

2018-09-24 Thread Thomas Munro
Constify dsa_size_class_map and use a better type. Author: Mark G Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CAEeOP_Zy_FvVwcAU0UX9nkOhnoR5KN%3D0B6LWX_kv0ZuSc4wbGw%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/64171b32069adcce7f57840143

pgsql: Ignore publication tables when --no-publications is used

2018-09-24 Thread Michael Paquier
Ignore publication tables when --no-publications is used 96e1cb4 has added support for --no-publications in pg_dump, pg_dumpall and pg_restore, but forgot the fact that publication tables also need to be ignored when this option is used. Author: Gilles Darold Reviewed-by: Michael Paquier Discussi

pgsql: Ignore publication tables when --no-publications is used

2018-09-24 Thread Michael Paquier
Ignore publication tables when --no-publications is used 96e1cb4 has added support for --no-publications in pg_dump, pg_dumpall and pg_restore, but forgot the fact that publication tables also need to be ignored when this option is used. Author: Gilles Darold Reviewed-by: Michael Paquier Discussi

pgsql: Ignore publication tables when --no-publications is used

2018-09-24 Thread Michael Paquier
Ignore publication tables when --no-publications is used 96e1cb4 has added support for --no-publications in pg_dump, pg_dumpall and pg_restore, but forgot the fact that publication tables also need to be ignored when this option is used. Author: Gilles Darold Reviewed-by: Michael Paquier Discussi

pgsql: Revoke pg_stat_statements_reset() permissions

2018-09-24 Thread Michael Paquier
Revoke pg_stat_statements_reset() permissions Commit 25fff40 has granted execute permission of the function pg_stat_statements_reset() to default role "pg_read_all_stats", but this role is meant to read statistics, and not to reset them. The permissions on this function are revoked from "pg_read_

pgsql: Revoke pg_stat_statements_reset() permissions

2018-09-24 Thread Michael Paquier
Revoke pg_stat_statements_reset() permissions Commit 25fff40 has granted execute permission of the function pg_stat_statements_reset() to default role "pg_read_all_stats", but this role is meant to read statistics, and not to reset them. The permissions on this function are revoked from "pg_read_

pgsql: Revoke pg_stat_statements_reset() permissions

2018-09-24 Thread Michael Paquier
Revoke pg_stat_statements_reset() permissions Commit 25fff40 has granted execute permission of the function pg_stat_statements_reset() to default role "pg_read_all_stats", but this role is meant to read statistics, and not to reset them. The permissions on this function are revoked from "pg_read_

pgsql: Sync our Snowball stemmer dictionaries with current upstream.

2018-09-24 Thread Tom Lane
Sync our Snowball stemmer dictionaries with current upstream. We haven't touched these since text search functionality landed in core in 2007 :-(. While the upstream project isn't a beehive of activity, they do make additions and bug fixes from time to time. Update our copies of these files. Al

pgsql: auto_explain: Include JIT information if applicable.

2018-09-24 Thread Andres Freund
auto_explain: Include JIT information if applicable. Due to my (Andres') omission auto_explain did not include information about JIT compilation. Fix that. Author: Lukas Fittl Discussion: https://postgr.es/m/CAP53PkzgSyoTCau0-5FNaM484B=uO8nLzma7L1ncWLb1=ov...@mail.gmail.com Backpatch: 11-, where

pgsql: Make EXPLAIN output for JIT compilation more dense.

2018-09-24 Thread Andres Freund
Make EXPLAIN output for JIT compilation more dense. A discussion about also reporting JIT compilation overhead on workers brought unhappiness with the verbosity of the current explain format to light. Make the text format more dense, and restructure the structured output to mirror that more close

pgsql: auto_explain: Include JIT information if applicable.

2018-09-24 Thread Andres Freund
auto_explain: Include JIT information if applicable. Due to my (Andres') omission auto_explain did not include information about JIT compilation. Fix that. Author: Lukas Fittl Discussion: https://postgr.es/m/CAP53PkzgSyoTCau0-5FNaM484B=uO8nLzma7L1ncWLb1=ov...@mail.gmail.com Backpatch: 11-, where

pgsql: Make EXPLAIN output for JIT compilation more dense.

2018-09-24 Thread Andres Freund
Make EXPLAIN output for JIT compilation more dense. A discussion about also reporting JIT compilation overhead on workers brought unhappiness with the verbosity of the current explain format to light. Make the text format more dense, and restructure the structured output to mirror that more close

pgsql: Fast default trigger and expand_tuple fixes

2018-09-24 Thread Andrew Dunstan
Fast default trigger and expand_tuple fixes Ensure that triggers get properly filled in tuples for the OLD value. Also fix the logic of detecting missing null values. The previous logic failed to detect a missing null column before the first missing column with a default. Fixing this has simplifie

pgsql: Fast default trigger and expand_tuple fixes

2018-09-24 Thread Andrew Dunstan
Fast default trigger and expand_tuple fixes Ensure that triggers get properly filled in tuples for the OLD value. Also fix the logic of detecting missing null values. The previous logic failed to detect a missing null column before the first missing column with a default. Fixing this has simplifie

pgsql: Use ppoll(2), if available, to wait for input in pgbench.

2018-09-24 Thread Tom Lane
Use ppoll(2), if available, to wait for input in pgbench. Previously, pgbench always used select(2) for this purpose, but that's problematic for very high client counts, because select() can't deal with file descriptor numbers larger than FD_SETSIZE. It's pretty common for that to be only 1024 or

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Fix over-allocation of space for array_out()'s result string.

2018-09-24 Thread Tom Lane
Fix over-allocation of space for array_out()'s result string. array_out overestimated the space needed for its output, possibly by a very substantial amount if the array is multi-dimensional, because of wrong order of operations in the loop that counts the number of curly-brace pairs needed. Whil

pgsql: Document aclitem functions and operators

2018-09-24 Thread Joe Conway
Document aclitem functions and operators aclitem functions and operators have been heretofore undocumented. Fix that. While at it, ensure the non-operator aclitem functions have pg_description strings. Does not seem worthwhile to back-patch. Author: Fabien Coelho, with pg_description from John N