pgsql: Set right-links during sorted GiST index build.

2020-10-01 Thread Heikki Linnakangas
Set right-links during sorted GiST index build.

This is not strictly necessary, as the right-links are only needed by
scans that are concurrent with page splits, and neither scans or page
splits can happen during sorted index build. But it seems like a good
idea to set them anyway, if we e.g. want to add a check to amcheck in
the future to verify that the chain of right-links is complete.

Author: Andrey Borodin
Discussion: 
https://www.postgresql.org/message-id/4D68C21F-9FB9-41DA-B663-FDFC8D143788%40yandex-team.ru

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/265ea567852a692e644fe6b207def4a2fc812adb

Modified Files
--
src/backend/access/gist/gistbuild.c | 13 +
1 file changed, 13 insertions(+)



pgsql: Fix incorrect assertion on number of array dimensions.

2020-10-01 Thread Heikki Linnakangas
Fix incorrect assertion on number of array dimensions.

This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.

Backpatch-through: 10
Discussion: 
https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi

Branch
--
REL_12_STABLE

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

Modified Files
--
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Fix incorrect assertion on number of array dimensions.

2020-10-01 Thread Heikki Linnakangas
Fix incorrect assertion on number of array dimensions.

This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.

Backpatch-through: 10
Discussion: 
https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/17fc1c729fc2220fee1ec125ff63d2f7ba6f466e

Modified Files
--
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Fix incorrect assertion on number of array dimensions.

2020-10-01 Thread Heikki Linnakangas
Fix incorrect assertion on number of array dimensions.

This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.

Backpatch-through: 10
Discussion: 
https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi

Branch
--
REL_13_STABLE

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

Modified Files
--
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Fix incorrect assertion on number of array dimensions.

2020-10-01 Thread Heikki Linnakangas
Fix incorrect assertion on number of array dimensions.

This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.

Backpatch-through: 10
Discussion: 
https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi

Branch
--
REL_10_STABLE

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

Modified Files
--
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Fix incorrect assertion on number of array dimensions.

2020-10-01 Thread Heikki Linnakangas
Fix incorrect assertion on number of array dimensions.

This has been wrong ever since the support for multi-dimensional
arrays as PL/python function arguments and return values was
introduced in commit 94aceed317.

Backpatch-through: 10
Discussion: 
https://www.postgresql.org/message-id/61647b8e-961c-0362-d5d3-c8a18f4a7ec6%40iki.fi

Branch
--
master

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

Modified Files
--
src/pl/plpython/plpy_typeio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Put back explicit setting of replication values within TAP tests

2020-10-01 Thread Tom Lane
Put back explicit setting of replication values within TAP tests.

Commit 151c0c5f7 neglected the possibility that a TEMP_CONFIG file
would explicitly set max_wal_senders=0; as indeed buildfarm member
thorntail does, so that it can test wal_level=minimal in other test
suites.  Hence, rather than assuming that max_wal_senders=10 will
prevail if we say nothing, set it explicitly.

Set max_replication_slots=10 explicitly too, just to be safe.

Back-patch to v10, like the previous patch.

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

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/26f4c14d7bcf53c4674055e53e69d94801ed8f68

Modified Files
--
src/test/perl/PostgresNode.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



pgsql: Put back explicit setting of replication values within TAP tests

2020-10-01 Thread Tom Lane
Put back explicit setting of replication values within TAP tests.

Commit 151c0c5f7 neglected the possibility that a TEMP_CONFIG file
would explicitly set max_wal_senders=0; as indeed buildfarm member
thorntail does, so that it can test wal_level=minimal in other test
suites.  Hence, rather than assuming that max_wal_senders=10 will
prevail if we say nothing, set it explicitly.

Set max_replication_slots=10 explicitly too, just to be safe.

Back-patch to v10, like the previous patch.

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

Branch
--
REL_11_STABLE

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

Modified Files
--
src/test/perl/PostgresNode.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



pgsql: Put back explicit setting of replication values within TAP tests

2020-10-01 Thread Tom Lane
Put back explicit setting of replication values within TAP tests.

Commit 151c0c5f7 neglected the possibility that a TEMP_CONFIG file
would explicitly set max_wal_senders=0; as indeed buildfarm member
thorntail does, so that it can test wal_level=minimal in other test
suites.  Hence, rather than assuming that max_wal_senders=10 will
prevail if we say nothing, set it explicitly.

Set max_replication_slots=10 explicitly too, just to be safe.

Back-patch to v10, like the previous patch.

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

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/6854c45b36aaf83378209168711bdef1ba99ec83

Modified Files
--
src/test/perl/PostgresNode.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



pgsql: Put back explicit setting of replication values within TAP tests

2020-10-01 Thread Tom Lane
Put back explicit setting of replication values within TAP tests.

Commit 151c0c5f7 neglected the possibility that a TEMP_CONFIG file
would explicitly set max_wal_senders=0; as indeed buildfarm member
thorntail does, so that it can test wal_level=minimal in other test
suites.  Hence, rather than assuming that max_wal_senders=10 will
prevail if we say nothing, set it explicitly.

Set max_replication_slots=10 explicitly too, just to be safe.

Back-patch to v10, like the previous patch.

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

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/6731f1ef19fdf912cfbf2686a4d344a022b7704b

Modified Files
--
src/test/perl/PostgresNode.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



pgsql: Put back explicit setting of replication values within TAP tests

2020-10-01 Thread Tom Lane
Put back explicit setting of replication values within TAP tests.

Commit 151c0c5f7 neglected the possibility that a TEMP_CONFIG file
would explicitly set max_wal_senders=0; as indeed buildfarm member
thorntail does, so that it can test wal_level=minimal in other test
suites.  Hence, rather than assuming that max_wal_senders=10 will
prevail if we say nothing, set it explicitly.

Set max_replication_slots=10 explicitly too, just to be safe.

Back-patch to v10, like the previous patch.

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

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/49642530486852f8fef248964e563aaab25ecae7

Modified Files
--
src/test/perl/PostgresNode.pm | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



pgsql: Add block information in error context of WAL REDO apply loop

2020-10-01 Thread Michael Paquier
Add block information in error context of WAL REDO apply loop

Providing this information can be useful for example when diagnosing
problems related to recovery conflicts or for recovery issues without
having to go through the output generated by pg_waldump to get some
information about the blocks a WAL record works on.

The block information is printed in the same format as pg_waldump.  This
already existed in xlog.c for debugging purposes with -DWAL_DEBUG, so
adding the block information in the callback has required just a small
refactoring.

Author: Bertrand Drouvot
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/9d0bd95fa90a7243047a74e29f265296a9fc556d

Modified Files
--
src/backend/access/transam/xlog.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)



pgsql: Add pg_stat_wal statistics view.

2020-10-01 Thread Fujii Masao
Add pg_stat_wal statistics view.

This view shows the statistics about WAL activity. Currently it has only
two columns: wal_buffers_full and stats_reset. wal_buffers_full column
indicates the number of times WAL data was written to the disk because
WAL buffers got full. This information is useful when tuning wal_buffers.
stats_reset column indicates the time at which these statistics were
last reset.

pg_stat_wal view is also the basic infrastructure to expose other
various statistics about WAL activity later.

Bump PGSTAT_FILE_FORMAT_ID due to the change in pgstat format.

Bump catalog version.

Author: Masahiro Ikeda
Reviewed-by: Takayuki Tsunakawa, Kyotaro Horiguchi, Amit Kapila, Fujii Masao
Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8d9a935965f01b7759a8c23ff6291000b670a2bf

Modified Files
--
doc/src/sgml/monitoring.sgml   |  63 -
src/backend/access/transam/xlog.c  |   1 +
src/backend/catalog/system_views.sql   |   6 ++
src/backend/postmaster/checkpointer.c  |   3 +
src/backend/postmaster/pgstat.c| 120 +++--
src/backend/utils/adt/pgstatfuncs.c|  36 ++
src/include/catalog/catversion.h   |   2 +-
src/include/catalog/pg_proc.dat|   8 +++
src/include/pgstat.h   |  33 -
src/test/regress/expected/rules.out|   3 +
src/test/regress/expected/sysviews.out |   7 ++
src/test/regress/sql/sysviews.sql  |   3 +
src/tools/pgindent/typedefs.list   |   2 +
13 files changed, 276 insertions(+), 11 deletions(-)



pgsql: doc: Improve some documentation about HA and replication

2020-10-01 Thread Michael Paquier
doc: Improve some documentation about HA and replication

This clarifies some wording in the description of the options available
as replication solutions.  While on it, this replaces some instances of
"master" with "primary", for consistency with recent changes like
9e101cf.

Author: Robert Treat
Reviewed-by: Magnus Hagander, Michael Paquier
Discussion: 
https://postgr.es/m/cajslcq2tpak_k8raofcamrqelcxy-h6mjrpdnrzc-lkppy7...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8550cbd0bae7c3004034351cb3447b51a552e56c

Modified Files
--
doc/src/sgml/high-availability.sgml | 46 ++---
1 file changed, 22 insertions(+), 24 deletions(-)