pgsql: Improve pruning of a default partition

2019-08-04 Thread Alvaro Herrera
Improve pruning of a default partition When querying a partitioned table containing a default partition, we were wrongly deciding to include it in the scan too early in the process, failing to exclude it in some cases. If we reinterpret the PruneStepResult.scan_default flag slightly, we can do a

pgsql: Improve pruning of a default partition

2019-08-04 Thread Alvaro Herrera
Improve pruning of a default partition When querying a partitioned table containing a default partition, we were wrongly deciding to include it in the scan too early in the process, failing to exclude it in some cases. If we reinterpret the PruneStepResult.scan_default flag slightly, we can do a

pgsql: Improve pruning of a default partition

2019-08-04 Thread Alvaro Herrera
Improve pruning of a default partition When querying a partitioned table containing a default partition, we were wrongly deciding to include it in the scan too early in the process, failing to exclude it in some cases. If we reinterpret the PruneStepResult.scan_default flag slightly, we can do a

pgsql: Avoid picking already-bound TCP ports in kerberos and ldap test

2019-08-04 Thread Tom Lane
Avoid picking already-bound TCP ports in kerberos and ldap test suites. src/test/kerberos and src/test/ldap need to run a private authentication server of the relevant type, for which they need a free TCP port. They were just picking a random port number in 48K-64K, which works except when somethi

pgsql: Avoid picking already-bound TCP ports in kerberos and ldap test

2019-08-04 Thread Tom Lane
Avoid picking already-bound TCP ports in kerberos and ldap test suites. src/test/kerberos and src/test/ldap need to run a private authentication server of the relevant type, for which they need a free TCP port. They were just picking a random port number in 48K-64K, which works except when somethi

pgsql: Avoid picking already-bound TCP ports in kerberos and ldap test

2019-08-04 Thread Tom Lane
Avoid picking already-bound TCP ports in kerberos and ldap test suites. src/test/kerberos and src/test/ldap need to run a private authentication server of the relevant type, for which they need a free TCP port. They were just picking a random port number in 48K-64K, which works except when somethi

pgsql: Fix handling of "undef" in contrib/jsonb_plperl.

2019-08-04 Thread Tom Lane
Fix handling of "undef" in contrib/jsonb_plperl. Perl has multiple internal representations of "undef", and just testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them, leading to "cannot transform this Perl type to jsonb" errors. Use the approved test SvOK() instead. Report and patch by

pgsql: Fix handling of "undef" in contrib/jsonb_plperl.

2019-08-04 Thread Tom Lane
Fix handling of "undef" in contrib/jsonb_plperl. Perl has multiple internal representations of "undef", and just testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them, leading to "cannot transform this Perl type to jsonb" errors. Use the approved test SvOK() instead. Report and patch by

pgsql: Fix handling of "undef" in contrib/jsonb_plperl.

2019-08-04 Thread Tom Lane
Fix handling of "undef" in contrib/jsonb_plperl. Perl has multiple internal representations of "undef", and just testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them, leading to "cannot transform this Perl type to jsonb" errors. Use the approved test SvOK() instead. Report and patch by

pgsql: Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24.

2019-08-04 Thread Tom Lane
Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6138386dcbd12831c5fb9f9b65e75cfeb407147b Modified Files -- doc/src/sgml/release-9.6.sgml | 550 ++ 1 file

pgsql: Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24.

2019-08-04 Thread Tom Lane
Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/83c8b61771a49485a2ecec80418c8cc2f82b6457 Modified Files -- doc/src/sgml/release-9.4.sgml | 413 ++ 1 file

pgsql: Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24.

2019-08-04 Thread Tom Lane
Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/670f2a43c2b980fd6dd7495ace10190b9efed227 Modified Files -- doc/src/sgml/release-10.sgml | 647 +++ 1 file

pgsql: Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24.

2019-08-04 Thread Tom Lane
Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7a5e39ec94814c0df595e896a62a765a260da517 Modified Files -- doc/src/sgml/release-11.sgml | 47 ++-- 1 file

pgsql: Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24.

2019-08-04 Thread Tom Lane
Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c84e356a8414341d2010442de4b7b41c5c751924 Modified Files -- doc/src/sgml/release-9.5.sgml | 438 ++ 1 file

pgsql: Revert "Silence compiler warning"

2019-08-04 Thread Tomas Vondra
Revert "Silence compiler warning" This reverts commit 9dc122585551516309c9362e673effdbf3bd79bd. As committed, statement sampling used the existing duration threshold (log_min_duration_statement) when decide which statements to sample. The issue is that even the longest statements are subject to s

pgsql: Revert "Add log_statement_sample_rate parameter"

2019-08-04 Thread Tomas Vondra
Revert "Add log_statement_sample_rate parameter" This reverts commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d. As committed, statement sampling used the existing duration threshold (log_min_duration_statement) when decide which statements to sample. The issue is that even the longest statements a

pgsql: Revert "Silence compiler warning"

2019-08-04 Thread Tomas Vondra
Revert "Silence compiler warning" This reverts commit 9dc122585551516309c9362e673effdbf3bd79bd. As committed, statement sampling used the existing duration threshold (log_min_duration_statement) when decide which statements to sample. The issue is that even the longest statements are subject to s

pgsql: Revert "Add log_statement_sample_rate parameter"

2019-08-04 Thread Tomas Vondra
Revert "Add log_statement_sample_rate parameter" This reverts commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d. As committed, statement sampling used the existing duration threshold (log_min_duration_statement) when decide which statements to sample. The issue is that even the longest statements a

pgsql: Adjust v12 release notes for reversion of log_statement_sample_r

2019-08-04 Thread Tom Lane
Adjust v12 release notes for reversion of log_statement_sample_rate. Necessary, not optional, because dangling link prevents relnotes from building. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2c133db2b42029a7df7d5d6cde48a898c6ca3ef0 Modified Files -

Re: pgsql: Improve pruning of a default partition

2019-08-04 Thread Alvaro Herrera
On 2019-Aug-04, Alvaro Herrera wrote: > Improve pruning of a default partition I just noticed that I failed to credit Shawn Wang, Thibaut Madeleine, Yoshikazu Imai, Kyotaro Horiguchi as reviewers of this patch. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development

pgsql: Fix inconsistencies and typos in the tree, take 9

2019-08-04 Thread Michael Paquier
Fix inconsistencies and typos in the tree, take 9 This addresses more issues with code comments, variable names and unreferenced variables. Author: Alexander Lakhin Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.po

pgsql: Fix tab completion for ALTER LANGUAGE in psql

2019-08-04 Thread Michael Paquier
Fix tab completion for ALTER LANGUAGE in psql OWNER_TO was used for the completion, which is not a supported grammar, but OWNER TO is. This error has been introduced by d37b816, so backpatch down to 9.6. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7ab..

pgsql: Fix tab completion for ALTER LANGUAGE in psql

2019-08-04 Thread Michael Paquier
Fix tab completion for ALTER LANGUAGE in psql OWNER_TO was used for the completion, which is not a supported grammar, but OWNER TO is. This error has been introduced by d37b816, so backpatch down to 9.6. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7ab..

pgsql: Fix tab completion for ALTER LANGUAGE in psql

2019-08-04 Thread Michael Paquier
Fix tab completion for ALTER LANGUAGE in psql OWNER_TO was used for the completion, which is not a supported grammar, but OWNER TO is. This error has been introduced by d37b816, so backpatch down to 9.6. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7ab..

pgsql: Fix tab completion for ALTER LANGUAGE in psql

2019-08-04 Thread Michael Paquier
Fix tab completion for ALTER LANGUAGE in psql OWNER_TO was used for the completion, which is not a supported grammar, but OWNER TO is. This error has been introduced by d37b816, so backpatch down to 9.6. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7ab..

pgsql: Fix tab completion for ALTER LANGUAGE in psql

2019-08-04 Thread Michael Paquier
Fix tab completion for ALTER LANGUAGE in psql OWNER_TO was used for the completion, which is not a supported grammar, but OWNER TO is. This error has been introduced by d37b816, so backpatch down to 9.6. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7ab..

pgsql: Add safeguards in LSN, numeric and float calculation for custom

2019-08-04 Thread Michael Paquier
Add safeguards in LSN, numeric and float calculation for custom errors Those data types use parsing and/or calculation wrapper routines which can generate some generic error messages in the event of a failure. The caller of these routines can also pass a pointer variable settable by the routine t