pgsql: pg_prewarm: Add missing LWLockRegisterTranche call.

2018-01-31 Thread Robert Haas
pg_prewarm: Add missing LWLockRegisterTranche call.

Commit 79ccd7cbd5ca44bee0191d12e9e65abf702899e7, which added automatic
prewarming, neglected this.

Kyotaro Horiguchi, reviewed by me.

Discussion: 
http://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/0ff5bd7b47377a6b5939d6fbbb67c8d42f9170dc

Modified Files
--
contrib/pg_prewarm/autoprewarm.c | 2 ++
1 file changed, 2 insertions(+)



pgsql: Fix list partition constraints for partition keys of array type.

2018-01-31 Thread Robert Haas
Fix list partition constraints for partition keys of array type.

The old code generated always generated a constraint of the form
col = ANY(ARRAY[val1, val2, ...]), but that's invalid when col is an
array type.  Instead, generate col = val when there's only one value,
col = val1 OR col = val2 OR ... when there are multiple values and
col is of array type, and the old form when there are multiple values
and col is not of an array type.

As a side benefit, this makes constraint exclusion able to prune
a list partition declared to accept a single Boolean value, which
didn't work before.

Amit Langote, reviewed by Etsuro Fujita

Discussion: 
http://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/3ccdc6f9a5876d0953912fd589989387764ed9a3

Modified Files
--
src/backend/catalog/partition.c   | 98 ++-
src/test/regress/expected/create_table.out| 18 -
src/test/regress/expected/foreign_data.out|  6 +-
src/test/regress/expected/partition_prune.out |  8 +--
src/test/regress/sql/create_table.sql |  6 ++
5 files changed, 93 insertions(+), 43 deletions(-)



pgsql: Fix list partition constraints for partition keys of array type.

2018-01-31 Thread Robert Haas
Fix list partition constraints for partition keys of array type.

The old code generated always generated a constraint of the form
col = ANY(ARRAY[val1, val2, ...]), but that's invalid when col is an
array type.  Instead, generate col = val when there's only one value,
col = val1 OR col = val2 OR ... when there are multiple values and
col is of array type, and the old form when there are multiple values
and col is not of an array type.

As a side benefit, this makes constraint exclusion able to prune
a list partition declared to accept a single Boolean value, which
didn't work before.

Amit Langote, reviewed by Etsuro Fujita

Discussion: 
http://postgr.es/m/[email protected]

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/86fba28657858307bb27d4d7e3a9ef053ac0c2b4

Modified Files
--
src/backend/catalog/partition.c| 96 --
src/test/regress/expected/create_table.out | 18 +-
src/test/regress/expected/foreign_data.out |  6 +-
src/test/regress/sql/create_table.sql  |  6 ++
4 files changed, 90 insertions(+), 36 deletions(-)



pgsql: doc: mention datadir locations are actually config locations

2018-01-31 Thread Bruce Momjian
doc:  mention datadir locations are actually config locations

Technically, pg_upgrade's --old-datadir and --new-datadir are
configuration directories, not necessarily data directories.  This is
reflected in the 'postgres' manual page, so do the same for pg_upgrade.

Reported-by: Yves Goergen

Bug: 14898

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/3dcc7ceec034788b6ef89f90eb1be869e0c40a05

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)



pgsql: doc: mention datadir locations are actually config locations

2018-01-31 Thread Bruce Momjian
doc:  mention datadir locations are actually config locations

Technically, pg_upgrade's --old-datadir and --new-datadir are
configuration directories, not necessarily data directories.  This is
reflected in the 'postgres' manual page, so do the same for pg_upgrade.

Reported-by: Yves Goergen

Bug: 14898

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/e5dede90971d2ddbb7bca72ffc329c043bf717db

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/1787c332dbb7629b893e52afcf37076ebe4db9a3

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/7c348e16c279f4e3f606171e5e9be8fee2489e60

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/7201c68793e98ffaa77616bda91613815aa0a66b

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/d40d97d6c74496a35111b29f8eef2a09cb43bc58

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/71bf5bc2c406966ae4bdcfc213f102da4756e8d9

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

2018-01-31 Thread Robert Haas
pgcrypto's encrypt() supports AES-128, AES-192, and AES-256

Previously, only 128 was mentioned, but the others are also supported.

Thomas Munro, reviewed by Michael Paquier and extended a bit by me.

Discussion: 
http://postgr.es/m/CAEepm=1xbbhxyjkofgjnm2qfz-zbvqhgu4aqvtgr+hegy4f...@mail.gmail.com

Branch
--
REL9_3_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/4ab8ded9fb4e3b28051e994163b90f0ea4946f9b

Modified Files
--
contrib/pgcrypto/expected/rijndael.out | 2 +-
contrib/pgcrypto/sql/rijndael.sql  | 2 +-
doc/src/sgml/pgcrypto.sgml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: Improve pg_upgrade rsync examples to use clusterdir

2018-01-31 Thread Bruce Momjian
doc: Improve pg_upgrade rsync examples to use clusterdir

Commit 9521ce4a7a1125385fb4de9689f345db594c516a from Sep 13, 2017 and
backpatched through 9.5 used rsync examples with datadir.  The reporter
has pointed out, and testing has verified, that clusterdir must be used,
so update the docs accordingly.

Reported-by: Don Seiler

Discussion: 
https://postgr.es/m/CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=c...@mail.gmail.com

Backpatch-through: 9.5

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/06b2f15f354cadec5fb5c50bdfe9cadf24c856fb

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



pgsql: doc: Improve pg_upgrade rsync examples to use clusterdir

2018-01-31 Thread Bruce Momjian
doc: Improve pg_upgrade rsync examples to use clusterdir

Commit 9521ce4a7a1125385fb4de9689f345db594c516a from Sep 13, 2017 and
backpatched through 9.5 used rsync examples with datadir.  The reporter
has pointed out, and testing has verified, that clusterdir must be used,
so update the docs accordingly.

Reported-by: Don Seiler

Discussion: 
https://postgr.es/m/CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=c...@mail.gmail.com

Backpatch-through: 9.5

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/c7be38fa33d2336a70d64dc6b31a3933e2aeb938

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



pgsql: doc: Improve pg_upgrade rsync examples to use clusterdir

2018-01-31 Thread Bruce Momjian
doc: Improve pg_upgrade rsync examples to use clusterdir

Commit 9521ce4a7a1125385fb4de9689f345db594c516a from Sep 13, 2017 and
backpatched through 9.5 used rsync examples with datadir.  The reporter
has pointed out, and testing has verified, that clusterdir must be used,
so update the docs accordingly.

Reported-by: Don Seiler

Discussion: 
https://postgr.es/m/CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=c...@mail.gmail.com

Backpatch-through: 9.5

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/0ae0f0777bf181df42368464600059d62b3a4e4d

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



pgsql: doc: Improve pg_upgrade rsync examples to use clusterdir

2018-01-31 Thread Bruce Momjian
doc: Improve pg_upgrade rsync examples to use clusterdir

Commit 9521ce4a7a1125385fb4de9689f345db594c516a from Sep 13, 2017 and
backpatched through 9.5 used rsync examples with datadir.  The reporter
has pointed out, and testing has verified, that clusterdir must be used,
so update the docs accordingly.

Reported-by: Don Seiler

Discussion: 
https://postgr.es/m/CAHJZqBD0u9dCERpYzK6BkRv=663AmH==DFJpVC=M4Xg_rq2=c...@mail.gmail.com

Backpatch-through: 9.5

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/de715414608846ce1ae44b79a39d61c48e25dce7

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 8 
1 file changed, 4 insertions(+), 4 deletions(-)



pgsql: Fix typo: colums -> columns.

2018-01-31 Thread Robert Haas
Fix typo: colums -> columns.

Along the way, also fix code indentation.

Alexander Lakhin, reviewed by Michael Paquier

Discussion: http://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/22757960bb3b2a6fa331bad132998c53b3e744a9

Modified Files
--
src/backend/parser/parse_utilcmd.c | 4 ++--
src/test/regress/expected/identity.out | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)



pgsql: Fix typo: colums -> columns.

2018-01-31 Thread Robert Haas
Fix typo: colums -> columns.

Along the way, also fix code indentation.

Alexander Lakhin, reviewed by Michael Paquier

Discussion: http://postgr.es/m/[email protected]

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a9fd6c321672c14940461ee47c52434bcf2ecdf9

Modified Files
--
src/backend/parser/parse_utilcmd.c | 4 ++--
src/test/regress/expected/identity.out | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
REL9_3_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/2d58ef3469e14d8b4f62c6bef98cb7c313ede2cc

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/19eb7f84e75f592c7a7134d2d02105a3d44ff7e7

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/12db49a83058d8e9269b405d9fe17ea662623e80

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/18821280e98ade69c4338d895c57bc22dc67643e

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/3b15255912af3fa428fbc296d830292ffc8c9803

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: in contrib-spi, mention and link to the meaning of SPI

2018-01-31 Thread Bruce Momjian
doc:  in contrib-spi, mention and link to the meaning of SPI

Also remove outdated comment about SPI subtransactions.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 9.3

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/27a5eaa71b72866be0a63b4e68868bc87bbee5a5

Modified Files
--
doc/src/sgml/contrib-spi.sgml | 4 +++-
doc/src/sgml/spi.sgml | 3 +--
2 files changed, 4 insertions(+), 3 deletions(-)



pgsql: doc: clearify trigger behavior for inheritance

2018-01-31 Thread Bruce Momjian
doc:  clearify trigger behavior for inheritance

The previous wording added in PG 10 wasn't specific enough about the
behavior of statement and row triggers when using inheritance.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/1cf1112990cff432b53a74a0ac9ca897ce8a7688

Modified Files
--
doc/src/sgml/ref/create_trigger.sgml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



pgsql: doc: clearify trigger behavior for inheritance

2018-01-31 Thread Bruce Momjian
doc:  clearify trigger behavior for inheritance

The previous wording added in PG 10 wasn't specific enough about the
behavior of statement and row triggers when using inheritance.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/5b648388b832620af403ad9cafae04eee46bd49f

Modified Files
--
doc/src/sgml/ref/create_trigger.sgml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



pgsql: doc: clarify major/minor pg_upgrade versions with examples

2018-01-31 Thread Bruce Momjian
doc:  clarify major/minor pg_upgrade versions with examples

The previous docs added in PG 10 were not clear enough for someone who
didn't understand the PG 10 version change, so give more specific
examples.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/59ad2463507622a1244740c4b527610f590dc473

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: clarify major/minor pg_upgrade versions with examples

2018-01-31 Thread Bruce Momjian
doc:  clarify major/minor pg_upgrade versions with examples

The previous docs added in PG 10 were not clear enough for someone who
didn't understand the PG 10 version change, so give more specific
examples.

Reported-by: [email protected]

Discussion: 
https://postgr.es/m/[email protected]

Backpatch-through: 10

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/b2e6dfeacfdcf493073c8a7e7deadd34e4d5ea03

Modified Files
--
doc/src/sgml/ref/pgupgrade.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: doc: fix trigger inheritance wording

2018-01-31 Thread Bruce Momjian
doc:  fix trigger inheritance wording

Fix wording from commit 1cf1112990cff432b53a74a0ac9ca897ce8a7688

Reported-by: Robert Haas

Backpatch-through: 10

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/94a2b075779b599c6ee21f04cfafdd68cd84797d

Modified Files
--
doc/src/sgml/ref/create_trigger.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: doc: fix trigger inheritance wording

2018-01-31 Thread Bruce Momjian
doc:  fix trigger inheritance wording

Fix wording from commit 1cf1112990cff432b53a74a0ac9ca897ce8a7688

Reported-by: Robert Haas

Backpatch-through: 10

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/eab30cc6b55dc03589bda13bc76b12d7142d5686

Modified Files
--
doc/src/sgml/ref/create_trigger.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)