pgsql: Remove use of deprecated containment operators in tests

2020-11-03 Thread Peter Eisentraut
Remove use of deprecated containment operators in tests

Switch @ to <@ and ~ to @> in gist-related tests.  The old operator
names have been deprecated and will eventually (possibly soon) be
removed.

Author: Justin Pryzby 
Discussion: 
https://www.postgresql.org/message-id/flat/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/3165426e54df02a6199c0a216546e5095e875a0a

Modified Files
--
src/test/regress/expected/create_am.out| 10 +-
src/test/regress/expected/create_index.out | 24 
src/test/regress/sql/create_am.sql |  4 ++--
src/test/regress/sql/create_index.sql  | 12 ++--
4 files changed, 25 insertions(+), 25 deletions(-)



pgsql: Use be_tls_* API for SSL information in sslinfo

2020-11-03 Thread Magnus Hagander
Use be_tls_* API for SSL information in sslinfo

sslinfo was passing the Port->ssl member directly to OpenSSL in order
to extract information regarding the connection. This breaks the API
provided by the backend TLS implementation, as well as duplicates code
for no benefit. Rewrite to make use of the backend API as much as
possible.

Author: Daniel Gustafsson 

Branch
--
master

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

Modified Files
--
contrib/sslinfo/sslinfo.c | 139 --
doc/src/sgml/sslinfo.sgml |   4 +-
2 files changed, 49 insertions(+), 94 deletions(-)



pgsql: Improve error handling in backend OpenSSL implementation

2020-11-03 Thread Magnus Hagander
Improve error handling in backend OpenSSL implementation

Commit d94c36a45ab introduced error handling to sslinfo to handle
OpenSSL errors gracefully. This ports this errorhandling to the
backend TLS implementation.

Author: Daniel Gustafsson 

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/13cfa02f77936895bff6ffabf1fde5d47fd1df07

Modified Files
--
src/backend/libpq/be-secure-openssl.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



pgsql: Use the non-deprecated TG_TABLE_MAME in test trigger

2020-11-03 Thread Magnus Hagander
Use the non-deprecated TG_TABLE_MAME in test trigger

Commit 3a9ae3d2068 (back in 2006) deprecated TG_RELNAME
in favor of TG_TABLE_NAME, but the existing usage in test
cases has remained till today. Change to use TG_TABLE_NAME
instead (TG_RELNAME is still covered by a test case).

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/44a184cb686866b10d63695db344195c239f9374

Modified Files
--
src/test/regress/expected/triggers.out | 4 ++--
src/test/regress/sql/triggers.sql  | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)



pgsql: Remove deprecated containment operators for built-in types

2020-11-03 Thread Peter Eisentraut
Remove deprecated containment operators for built-in types

Remove old containment operators @ and ~ for built-in geometry data
types.  These have been deprecated; use <@ and @> instead.

(Some contrib modules still contain the same deprecated operators.
That will be dealt with separately.)

Author: Justin Pryzby 
Discussion: 
https://www.postgresql.org/message-id/flat/[email protected]

Branch
--
master

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

Modified Files
--
doc/src/sgml/func.sgml   |  9 -
src/include/catalog/catversion.h |  2 +-
src/include/catalog/pg_amop.dat  | 18 -
src/include/catalog/pg_operator.dat  | 65 
src/test/regress/expected/create_am.out  |  2 -
src/test/regress/expected/opr_sanity.out |  7 +---
src/test/regress/sql/create_am.sql   |  2 -
7 files changed, 3 insertions(+), 102 deletions(-)



pgsql: Disallow ALTER TABLE ONLY / DROP EXPRESSION

2020-11-03 Thread Peter Eisentraut
Disallow ALTER TABLE ONLY / DROP EXPRESSION

The current implementation cannot handle this correctly, so just
forbid it for now.

GENERATED clauses must be attached to the column definition and cannot
be added later like DEFAULT, so if a child table has a generation
expression that the parent does not have, the child column will
necessarily be an attlocal column.  So to implement ALTER TABLE ONLY /
DROP EXPRESSION, we'd need extra code to update attislocal of the
direct child tables, somewhat similar to how DROP COLUMN does it, so
that the resulting state can be properly dumped and restored.

Discussion: 
https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us

Branch
--
master

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

Modified Files
--
src/backend/commands/tablecmds.c| 22 +++---
src/test/regress/expected/generated.out | 11 ++-
src/test/regress/sql/generated.sql  |  2 +-
3 files changed, 26 insertions(+), 9 deletions(-)



pgsql: Disallow ALTER TABLE ONLY / DROP EXPRESSION

2020-11-03 Thread Peter Eisentraut
Disallow ALTER TABLE ONLY / DROP EXPRESSION

The current implementation cannot handle this correctly, so just
forbid it for now.

GENERATED clauses must be attached to the column definition and cannot
be added later like DEFAULT, so if a child table has a generation
expression that the parent does not have, the child column will
necessarily be an attlocal column.  So to implement ALTER TABLE ONLY /
DROP EXPRESSION, we'd need extra code to update attislocal of the
direct child tables, somewhat similar to how DROP COLUMN does it, so
that the resulting state can be properly dumped and restored.

Discussion: 
https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/53977598174652dcb06bc2b26674c29b9ae601cc

Modified Files
--
src/backend/commands/tablecmds.c| 22 +++---
src/test/regress/expected/generated.out | 11 ++-
src/test/regress/sql/generated.sql  |  2 +-
3 files changed, 26 insertions(+), 9 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/501035a0ac7f711ee2f899cb08acb2a4237d7f4d

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  4 +++-
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 18 insertions(+), 7 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
master

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

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  4 +++-
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 18 insertions(+), 7 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/136f87ea57b3a7a6bf64c832a5e1b69e18091775

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  4 +++-
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 18 insertions(+), 7 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL_10_STABLE

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

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  6 --
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 19 insertions(+), 8 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/77df80cf691af9270ef52d860b5615d6d0a7afbc

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  6 --
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 19 insertions(+), 8 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/04c4b495b1c93c40bc989c450ca8fb5bea965e27

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  6 --
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 19 insertions(+), 8 deletions(-)



pgsql: Allow users with BYPASSRLS to alter their own passwords.

2020-11-03 Thread Tom Lane
Allow users with BYPASSRLS to alter their own passwords.

The intention in commit 491c029db was to require superuserness to
change the BYPASSRLS property, but the actual effect of the coding
in AlterRole() was to require superuserness to change anything at all
about a BYPASSRLS role.  Other properties of a BYPASSRLS role should
be changeable under the same rules as for a normal role, though.

Fix that, and also take care of some documentation omissions related
to BYPASSRLS and REPLICATION role properties.

Tom Lane and Stephen Frost, per bug report from Wolfgang Walther.
Back-patch to all supported branches.

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

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/768dbef0d49826c2e404ceb1567b3cc9e2bbc30a

Modified Files
--
doc/src/sgml/ref/alter_role.sgml  |  4 +++-
doc/src/sgml/ref/create_role.sgml | 11 +--
src/backend/commands/user.c   | 10 ++
3 files changed, 18 insertions(+), 7 deletions(-)



pgsql: Improve error messages around REPLICATION and BYPASSRLS properti

2020-11-03 Thread Tom Lane
Improve error messages around REPLICATION and BYPASSRLS properties.

Clarify wording as per suggestion from Wolfgang Walther.
No back-patch; this doesn't seem worth thrashing translatable
strings in the back branches.

Tom Lane and Stephen Frost

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

Branch
--
master

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

Modified Files
--
src/backend/commands/user.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



pgsql: Guard against core dump from uninitialized subplan.

2020-11-03 Thread Tom Lane
Guard against core dump from uninitialized subplan.

If the planner erroneously puts a non-parallel-safe SubPlan into
a parallelized portion of the query tree, nodeSubplan.c will fail
in the worker processes because it finds a null in es_subplanstates,
which it's unable to cope with.  It seems worth a test-and-elog to
make that an error case rather than a core dump case.

This probably should have been included in commit 16ebab688, which
was responsible for allowing nulls to appear in es_subplanstates
to begin with.  So, back-patch to v10 where that came in.

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

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/936043c9eacb9e9c7356a8190a410d2c4e4ea03a

Modified Files
--
src/backend/executor/nodeSubplan.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgsql: Guard against core dump from uninitialized subplan.

2020-11-03 Thread Tom Lane
Guard against core dump from uninitialized subplan.

If the planner erroneously puts a non-parallel-safe SubPlan into
a parallelized portion of the query tree, nodeSubplan.c will fail
in the worker processes because it finds a null in es_subplanstates,
which it's unable to cope with.  It seems worth a test-and-elog to
make that an error case rather than a core dump case.

This probably should have been included in commit 16ebab688, which
was responsible for allowing nulls to appear in es_subplanstates
to begin with.  So, back-patch to v10 where that came in.

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

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/205f958406cc85f8f73e151906ecd281ff05d80a

Modified Files
--
src/backend/executor/nodeSubplan.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgsql: Guard against core dump from uninitialized subplan.

2020-11-03 Thread Tom Lane
Guard against core dump from uninitialized subplan.

If the planner erroneously puts a non-parallel-safe SubPlan into
a parallelized portion of the query tree, nodeSubplan.c will fail
in the worker processes because it finds a null in es_subplanstates,
which it's unable to cope with.  It seems worth a test-and-elog to
make that an error case rather than a core dump case.

This probably should have been included in commit 16ebab688, which
was responsible for allowing nulls to appear in es_subplanstates
to begin with.  So, back-patch to v10 where that came in.

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

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/92f87182f2c617fd420832972b6d0ae4527301c8

Modified Files
--
src/backend/executor/nodeSubplan.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgsql: Guard against core dump from uninitialized subplan.

2020-11-03 Thread Tom Lane
Guard against core dump from uninitialized subplan.

If the planner erroneously puts a non-parallel-safe SubPlan into
a parallelized portion of the query tree, nodeSubplan.c will fail
in the worker processes because it finds a null in es_subplanstates,
which it's unable to cope with.  It seems worth a test-and-elog to
make that an error case rather than a core dump case.

This probably should have been included in commit 16ebab688, which
was responsible for allowing nulls to appear in es_subplanstates
to begin with.  So, back-patch to v10 where that came in.

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

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/55416b26a98fcf354af88cdd27fc2e045453b68a

Modified Files
--
src/backend/executor/nodeSubplan.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgsql: Guard against core dump from uninitialized subplan.

2020-11-03 Thread Tom Lane
Guard against core dump from uninitialized subplan.

If the planner erroneously puts a non-parallel-safe SubPlan into
a parallelized portion of the query tree, nodeSubplan.c will fail
in the worker processes because it finds a null in es_subplanstates,
which it's unable to cope with.  It seems worth a test-and-elog to
make that an error case rather than a core dump case.

This probably should have been included in commit 16ebab688, which
was responsible for allowing nulls to appear in es_subplanstates
to begin with.  So, back-patch to v10 where that came in.

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

Branch
--
REL_10_STABLE

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

Modified Files
--
src/backend/executor/nodeSubplan.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgsql: Use INT64_FORMAT to print int64 variables in sort debug

2020-11-03 Thread Tomas Vondra
Use INT64_FORMAT to print int64 variables in sort debug

Commit 6ee3b5fb99 cleaned up most of the long/int64 confusion related to
incremental sort, but the sort debug messages were still using %ld for
int64 variables. So fix that.

Author: Haiying Tang
Backpatch-through: 13, where the incremental sort code was added
Discussion: 
https://postgr.es/m/4250be9d350c4992abb722a76e288aef%40G08CNEXMBPEKD05.g08.fujitsu.local

Branch
--
REL_13_STABLE

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

Modified Files
--
src/backend/executor/nodeIncrementalSort.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)



pgsql: Use INT64_FORMAT to print int64 variables in sort debug

2020-11-03 Thread Tomas Vondra
Use INT64_FORMAT to print int64 variables in sort debug

Commit 6ee3b5fb99 cleaned up most of the long/int64 confusion related to
incremental sort, but the sort debug messages were still using %ld for
int64 variables. So fix that.

Author: Haiying Tang
Backpatch-through: 13, where the incremental sort code was added
Discussion: 
https://postgr.es/m/4250be9d350c4992abb722a76e288aef%40G08CNEXMBPEKD05.g08.fujitsu.local

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/90851d1d26f54ccb4d7b1bc49449138113d6ec83

Modified Files
--
src/backend/executor/nodeIncrementalSort.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)



pgsql: Fix get_useful_pathkeys_for_relation for volatile expressions

2020-11-03 Thread Tomas Vondra
Fix get_useful_pathkeys_for_relation for volatile expressions

When considering Incremental Sort below a Gather Merge, we need to be
a bit more careful when matching pathkeys to EC members. It's not enough
to find a member whose Vars are all in the current relation's target;
volatile expressions in particular need to be contained in the target,
otherwise it's too early to use the pathkey.

Reported-by: Jaime Casanova
Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13, where the incremental sort code was added
Discussion: 
https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/optimizer/path/allpaths.c  | 13 ++--
src/backend/optimizer/path/equivclass.c| 70 ++
src/include/optimizer/paths.h  |  1 +
src/test/regress/expected/incremental_sort.out | 98 ++
src/test/regress/sql/incremental_sort.sql  | 31 
5 files changed, 207 insertions(+), 6 deletions(-)



pgsql: Fix get_useful_pathkeys_for_relation for volatile expressions

2020-11-03 Thread Tomas Vondra
Fix get_useful_pathkeys_for_relation for volatile expressions

When considering Incremental Sort below a Gather Merge, we need to be
a bit more careful when matching pathkeys to EC members. It's not enough
to find a member whose Vars are all in the current relation's target;
volatile expressions in particular need to be contained in the target,
otherwise it's too early to use the pathkey.

Reported-by: Jaime Casanova
Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13, where the incremental sort code was added
Discussion: 
https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com

Branch
--
REL_13_STABLE

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

Modified Files
--
src/backend/optimizer/path/allpaths.c  | 13 ++--
src/backend/optimizer/path/equivclass.c| 70 ++
src/include/optimizer/paths.h  |  1 +
src/test/regress/expected/incremental_sort.out | 98 ++
src/test/regress/sql/incremental_sort.sql  | 31 
5 files changed, 207 insertions(+), 6 deletions(-)



pgsql: Revert pg_relation_check_pages()

2020-11-03 Thread Michael Paquier
Revert pg_relation_check_pages()

This reverts the following set of commits, following complaints about
the lack of portability of the central part of the code in bufmgr.c as
well as the use of partition mapping locks during page reads:
c780a7a9
f2b88396
b787d4ce
ce7f772c
60a51c6b

Per discussion with Andres Freund, Robert Haas and myself.

Bump catalog version.

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

Branch
--
master

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

Modified Files
--
doc/src/sgml/func.sgml  |  56 
src/backend/catalog/system_views.sql|   9 --
src/backend/storage/buffer/bufmgr.c |  92 -
src/backend/utils/adt/Makefile  |   1 -
src/backend/utils/adt/pagefuncs.c   | 229 ---
src/include/catalog/catversion.h|   2 +-
src/include/catalog/pg_proc.dat |   7 -
src/include/storage/bufmgr.h|   3 -
src/test/recovery/t/022_page_check.pl   | 231 
src/test/regress/expected/pagefuncs.out |  72 --
src/test/regress/parallel_schedule  |   2 +-
src/test/regress/serial_schedule|   1 -
src/test/regress/sql/pagefuncs.sql  |  41 --
src/tools/pgindent/typedefs.list|   1 -
14 files changed, 2 insertions(+), 745 deletions(-)



pgsql: Tolerate version lookup failure for old style Windows locale nam

2020-11-03 Thread Thomas Munro
Tolerate version lookup failure for old style Windows locale names.

Accept that we can't get versions for such locale names for now.  Users
will need to specify the newer language tag format to enable the
collation versioning feature.  It's not clear that we can do automatic
conversion from the old style to the new style reliably enough for this
purpose.

Unfortunately, this means that collation versioning probably won't work
for the default collation unless you provide something like en-US at
initdb or CREATE DATABASE time (though, for reasons not yet understood,
it does seem to work on some systems).  It'd be nice to find a better
solution, or document this quirk if we settle on it, but this should
unbreak the 3 failing build farm animals in the meantime.

Reviewed-by: David Rowley 
Reviewed-by: Tom Lane 
Discussion: 
https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/utils/adt/pg_locale.c | 12 
1 file changed, 12 insertions(+)



pgsql: Use standard SIGHUP handler in syslogger.

2020-11-03 Thread Fujii Masao
Use standard SIGHUP handler in syslogger.

Commit 1e53fe0e70 changed background processes so that they use
standard SIGHUP handler. Like that, this commit makes syslogger use
standard SIGHUP handler to simplify the code.

Author: Bharath Rupireddy
Reviewed-by: Fujii Masao
Discussion: 
https://postgr.es/m/calj2acxporuqepswdtoem_s82v9rw32e1fymopz5nue+twk...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/02d332297f9bfe63476d53a439cc8f3b05bb5e67

Modified Files
--
src/backend/postmaster/syslogger.c | 21 -
1 file changed, 4 insertions(+), 17 deletions(-)



pgsql: Get rid of the dedicated latch for signaling the startup process

2020-11-03 Thread Fujii Masao
Get rid of the dedicated latch for signaling the startup process.

This commit gets rid of the dedicated latch for signaling the startup
process in favor of using its procLatch,  since that comports better
with possible generic signal handlers using that latch.

Commit 1e53fe0e70 changed background processes so that they use standard
SIGHUP handler. Like that, this commit also makes the startup process use
standard SIGHUP handler to simplify the code.

Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Michael Paquier
Discussion: 
https://postgr.es/m/calj2acxporuqepswdtoem_s82v9rw32e1fymopz5nue+twk...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/access/transam/xlog.c | 29 ++---
src/backend/postmaster/startup.c  | 24 +---
2 files changed, 19 insertions(+), 34 deletions(-)