[COMMITTERS] pgsql: Set range table for CopyFrom() in tablesync

2017-04-17 Thread Peter Eisentraut
Set range table for CopyFrom() in tablesync CopyFrom() needs a range table for formatting certain errors for constraint violations. This changes the mechanism of how the range table is passed to the CopyFrom() executor state. We used to generate the range table and one entry for the relation man

[COMMITTERS] pgsql: doc: Clarify logical replication details

2017-04-17 Thread Peter Eisentraut
doc: Clarify logical replication details Document more explicitly that the target table can have more columns than the source table. Reported-by: Euler Taveira Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8efd1e08f063892be13de085e5e2c0e802fadf55 Modified Files

[COMMITTERS] pgsql: Rename columns in new pg_statistic_ext catalog

2017-04-17 Thread Alvaro Herrera
Rename columns in new pg_statistic_ext catalog The new catalog reused a column prefix "sta" from pg_statistic, but this is undesirable, so change the catalog to use prefix "stx" instead. Also, rename the column that lists enabled statistic kinds as "stxkind" rather than "enabled". Discussion: ht

[COMMITTERS] pgsql: Tighten up relation kind checks for extended statistics

2017-04-17 Thread Alvaro Herrera
Tighten up relation kind checks for extended statistics We were accepting creation of extended statistics only for regular tables, but they can usefully be created for foreign tables, partitioned tables, and materialized views, too. Allow those cases. While at it, make sure all the rejected case

[COMMITTERS] pgsql: Always build a custom plan node's targetlist from the path's pat

2017-04-17 Thread Tom Lane
Always build a custom plan node's targetlist from the path's pathtarget. We were applying the use_physical_tlist optimization to all relation scan plans, even those implemented by custom scan providers. However, that's a bad idea for a couple of reasons. The custom provider might be unable to pr

[COMMITTERS] pgsql: Always build a custom plan node's targetlist from the path's pat

2017-04-17 Thread Tom Lane
Always build a custom plan node's targetlist from the path's pathtarget. We were applying the use_physical_tlist optimization to all relation scan plans, even those implemented by custom scan providers. However, that's a bad idea for a couple of reasons. The custom provider might be unable to pr

[COMMITTERS] pgsql: Always build a custom plan node's targetlist from the path's pat

2017-04-17 Thread Tom Lane
Always build a custom plan node's targetlist from the path's pathtarget. We were applying the use_physical_tlist optimization to all relation scan plans, even those implemented by custom scan providers. However, that's a bad idea for a couple of reasons. The custom provider might be unable to pr

[COMMITTERS] pgsql: Fix typos in comment and log message.

2017-04-17 Thread Fujii Masao
Fix typos in comment and log message. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/9e0e5550c5f273dc4133687b1a682eb39933f47e Modified Files -- src/backend/catalog/aclchk.c | 2 +- src/backend/commands/subscriptioncmds.c| 2 +- src/test/r

[COMMITTERS] pgsql: Fix new warnings from GCC 7

2017-04-17 Thread Peter Eisentraut
Fix new warnings from GCC 7 This addresses the new warning types -Wformat-truncation -Wformat-overflow that are part of -Wall, via -Wformat, in GCC 7. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/6275f5d28a1577563f53f2171689d4f890a46881 Modified Files ---

[COMMITTERS] pgsql: Support OpenSSL 1.1.0 in 9.3 and 9.2.

2017-04-17 Thread Tom Lane
Support OpenSSL 1.1.0 in 9.3 and 9.2. This commit back-patches the equivalent of the 9.5-branch commits e2838c580 and 48e5ba61e, so that we can work with OpenSSL 1.1.0 in all supported branches. Original patches by Andreas Karlsson and Heikki Linnakangas, back-patching work by Andreas Karlsson.

[COMMITTERS] pgsql: Support OpenSSL 1.1.0 in 9.3 and 9.2.

2017-04-17 Thread Tom Lane
Support OpenSSL 1.1.0 in 9.3 and 9.2. This commit back-patches the equivalent of the 9.5-branch commits e2838c580 and 48e5ba61e, so that we can work with OpenSSL 1.1.0 in all supported branches. Original patches by Andreas Karlsson and Heikki Linnakangas, back-patching work by Andreas Karlsson.

[COMMITTERS] pgsql: Fix perlcritic warnings

2017-04-17 Thread Peter Eisentraut
Fix perlcritic warnings Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/0e8286d354520cd8b8ac5e7a963130769f731476 Modified Files -- src/common/unicode/generate-norm_test_table.pl| 4 ++-- src/common/unicode/generate-unicode_norm_table.pl | 6 +++--- 2 fi

Re: [COMMITTERS] pgsql: Fix integer-overflow problems in interval comparison.

2017-04-17 Thread Andres Freund
On 2017-04-17 13:04:31 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > On 4/5/17 23:51, Tom Lane wrote: > >> Fix integer-overflow problems in interval comparison. > > > This is failing cpluspluscheck now because C++ does not have > > _Static_assert, which is used in int128.h. > > Hmm. We

Re: [COMMITTERS] pgsql: Fix integer-overflow problems in interval comparison.

2017-04-17 Thread Tom Lane
Peter Eisentraut writes: > On 4/5/17 23:51, Tom Lane wrote: >> Fix integer-overflow problems in interval comparison. > This is failing cpluspluscheck now because C++ does not have > _Static_assert, which is used in int128.h. Hmm. We could drop that assert, or move it to some .c file, or wrap it

[COMMITTERS] pgsql: Fix extended statistics with partial analyzes

2017-04-17 Thread Alvaro Herrera
Fix extended statistics with partial analyzes Either because of a previous ALTER TABLE .. SET STATISTICS 0 or because of being invoked with a partial column list, ANALYZE could fail to acquire sufficient data to build extended statistics. Previously, this would draw an ERROR and fail to collect a

[COMMITTERS] pgsql: Back-patch 9.4-era SSL renegotiation code into 9.3 and 9.2.

2017-04-17 Thread Tom Lane
Back-patch 9.4-era SSL renegotiation code into 9.3 and 9.2. This back-patches 9.4 commits 31cf1a1a4, 86029b31e, and 36a3be654 into the prior branches, along with relevant bits of b1aebbb6a and 7ce2a45ae. We had foreseen doing this once the code was proven, but that never did happen, probably becau

[COMMITTERS] pgsql: Back-patch 9.4-era SSL renegotiation code into 9.3 and 9.2.

2017-04-17 Thread Tom Lane
Back-patch 9.4-era SSL renegotiation code into 9.3 and 9.2. This back-patches 9.4 commits 31cf1a1a4, 86029b31e, and 36a3be654 into the prior branches, along with relevant bits of b1aebbb6a and 7ce2a45ae. We had foreseen doing this once the code was proven, but that never did happen, probably becau

Re: [COMMITTERS] pgsql: Fix integer-overflow problems in interval comparison.

2017-04-17 Thread Peter Eisentraut
On 4/5/17 23:51, Tom Lane wrote: > Fix integer-overflow problems in interval comparison. > Branch > -- > REL9_4_STABLE > > Details > --- > http://git.postgresql.org/pg/commitdiff/8851bcf8813baa0ea393ef9d2894d15b3f13f957 > > Modified Files > -- > src/backend/utils/adt/timestam

[COMMITTERS] pgsql: pg_dump: Emit ONLY before table added to publication

2017-04-17 Thread Peter Eisentraut
pg_dump: Emit ONLY before table added to publication This is necessary to be able to reproduce publication membership correctly if tables are involved in inheritance. Author: Amit Langote Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/419a23b478ae760b797188341ddce

[COMMITTERS] pgsql: Document that ONLY can be specified in publication commands

2017-04-17 Thread Peter Eisentraut
Document that ONLY can be specified in publication commands Author: Amit Langote Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/1fe33252a08c285de9e84615cfde0569b9a75e58 Modified Files -- doc/src/sgml/ref/alter_publication.sgml | 12 doc/s