pgsql: doc PG 18 relnotes: fix missing parens for crc32c()

2025-05-09 Thread Bruce Momjian
doc PG 18 relnotes:  fix missing parens for crc32c()

Reported-by: Steven Niu

Discussion: 
https://postgr.es/m/CABBtG=ejqk58cfwpw3etvzfqfhjc-qoqv+9gqwrnlo+p9wy...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/89372d0aaa4a6f0e560acdf9014c5ad66fdde1b1

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



pgsql: Add support for runtime arguments in injection points

2025-05-09 Thread Michael Paquier
Add support for runtime arguments in injection points

The macros INJECTION_POINT() and INJECTION_POINT_CACHED() are extended
with an optional argument that can be passed down to the callback
attached when an injection point is run, giving to callbacks the
possibility to manipulate a stack state given by the caller.  The
existing callbacks in modules injection_points and test_aio have their
declarations adjusted based on that.

da7226993fd4 (core AIO infrastructure) and 93bc3d75d8e1 (test_aio) and
been relying on a set of workarounds where a static variable called
pgaio_inj_cur_handle is used as runtime argument in the injection point
callbacks used by the AIO tests, in combination with a TRY/CATCH block
to reset the argument value.  The infrastructure introduced in this
commit will be reused for the AIO tests, simplifying them.

Reviewed-by: Greg Burd 
Discussion: https://postgr.es/m/z_y9ttnxubvya...@paquier.xyz

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/371f2db8b05e4d46cbf489f05cbfc4d6ed6976d4

Modified Files
--
doc/src/sgml/xfunc.sgml  | 16 ++--
src/backend/access/gin/ginbtree.c|  6 +++---
src/backend/access/heap/heapam.c |  2 +-
src/backend/access/index/genam.c |  2 +-
src/backend/access/transam/multixact.c   |  4 ++--
src/backend/access/transam/xlog.c|  2 +-
src/backend/commands/indexcmds.c |  4 ++--
src/backend/executor/nodeAgg.c   | 10 +-
src/backend/libpq/be-secure-gssapi.c |  2 +-
src/backend/libpq/be-secure.c|  2 +-
src/backend/postmaster/autovacuum.c  |  2 +-
src/backend/storage/aio/aio.c|  2 +-
src/backend/tcop/backend_startup.c   |  2 +-
src/backend/tcop/postgres.c  |  6 +++---
src/backend/utils/cache/catcache.c   |  2 +-
src/backend/utils/cache/inval.c  |  2 +-
src/backend/utils/cache/typcache.c   |  2 +-
src/backend/utils/init/postinit.c|  2 +-
src/backend/utils/misc/injection_point.c |  8 
src/include/utils/injection_point.h  | 15 ---
src/test/modules/injection_points/injection_points.c | 19 +++
src/test/modules/test_aio/test_aio.c | 12 
src/test/modules/test_slru/test_multixact.c  |  2 +-
23 files changed, 69 insertions(+), 57 deletions(-)



pgsql: Skip RSA-PSS ssl test when using LibreSSL.

2025-05-09 Thread Tom Lane
Skip RSA-PSS ssl test when using LibreSSL.

Presently, LibreSSL does not have working support for RSA-PSS,
so disable that test.  Per discussion at
https://marc.info/?l=libressl&m=174664225002441&w=2
they do intend to fix this, but it's a ways off yet.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_17_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/3007fee7f2924e76748e81d7fd86cdf24a98a520

Modified Files
--
src/test/ssl/t/002_scram.pl | 6 ++
1 file changed, 6 insertions(+)



pgsql: Ooops ... add required configure support.

2025-05-09 Thread Tom Lane
Ooops ... add required configure support.

The previous commit assumed we have a configure probe for
SSL_CTX_set_cert_cb.  v15 lacks that, so add it now.
(Details borrowed from 36f40ce2d.)

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15 only

Branch
--
REL_15_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/00811a96ac45dc11cf2e144927b5c75645454d28

Modified Files
--
configure  | 12 +++-
configure.ac   |  5 +++--
src/include/pg_config.h.in |  3 +++
src/tools/msvc/Solution.pm |  1 +
4 files changed, 14 insertions(+), 7 deletions(-)



pgsql: Skip RSA-PSS ssl test when using LibreSSL.

2025-05-09 Thread Tom Lane
Skip RSA-PSS ssl test when using LibreSSL.

Presently, LibreSSL does not have working support for RSA-PSS,
so disable that test.  Per discussion at
https://marc.info/?l=libressl&m=174664225002441&w=2
they do intend to fix this, but it's a ways off yet.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_16_STABLE

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

Modified Files
--
src/test/ssl/t/002_scram.pl | 7 +++
1 file changed, 7 insertions(+)



pgsql: Centralize ssl tests' check for whether we're using LibreSSL.

2025-05-09 Thread Tom Lane
Centralize ssl tests' check for whether we're using LibreSSL.

Right now there's only one caller, so that this is merely
an exercise in shoving code from one module to another,
but there will shortly be another one.  It seems better to
avoid having two copies of this highly-subject-to-change test.

Back-patch to v15, where we first introduced some tests that
don't work with LibreSSL.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_17_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/976a8c2170f11bdb574a68d009d353057377528e

Modified Files
--
src/test/ssl/t/001_ssltests.pl|  6 ++
src/test/ssl/t/SSL/Backend/OpenSSL.pm | 20 
src/test/ssl/t/SSL/Server.pm  | 17 +
3 files changed, 39 insertions(+), 4 deletions(-)



pgsql: Skip RSA-PSS ssl test when using LibreSSL.

2025-05-09 Thread Tom Lane
Skip RSA-PSS ssl test when using LibreSSL.

Presently, LibreSSL does not have working support for RSA-PSS,
so disable that test.  Per discussion at
https://marc.info/?l=libressl&m=174664225002441&w=2
they do intend to fix this, but it's a ways off yet.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_15_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/793aa989f8e411ff91ba501fbc2030062f252d01

Modified Files
--
src/test/ssl/t/002_scram.pl | 7 +++
1 file changed, 7 insertions(+)



pgsql: Centralize ssl tests' check for whether we're using LibreSSL.

2025-05-09 Thread Tom Lane
Centralize ssl tests' check for whether we're using LibreSSL.

Right now there's only one caller, so that this is merely
an exercise in shoving code from one module to another,
but there will shortly be another one.  It seems better to
avoid having two copies of this highly-subject-to-change test.

Back-patch to v15, where we first introduced some tests that
don't work with LibreSSL.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
master

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

Modified Files
--
src/test/ssl/t/001_ssltests.pl|  5 ++---
src/test/ssl/t/SSL/Backend/OpenSSL.pm | 18 ++
src/test/ssl/t/SSL/Server.pm  | 17 +
3 files changed, 37 insertions(+), 3 deletions(-)



pgsql: Centralize ssl tests' check for whether we're using LibreSSL.

2025-05-09 Thread Tom Lane
Centralize ssl tests' check for whether we're using LibreSSL.

Right now there's only one caller, so that this is merely
an exercise in shoving code from one module to another,
but there will shortly be another one.  It seems better to
avoid having two copies of this highly-subject-to-change test.

Back-patch to v15, where we first introduced some tests that
don't work with LibreSSL.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_16_STABLE

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

Modified Files
--
src/test/ssl/t/001_ssltests.pl|  6 ++
src/test/ssl/t/SSL/Backend/OpenSSL.pm | 20 
src/test/ssl/t/SSL/Server.pm  | 17 +
3 files changed, 39 insertions(+), 4 deletions(-)



pgsql: Skip RSA-PSS ssl test when using LibreSSL.

2025-05-09 Thread Tom Lane
Skip RSA-PSS ssl test when using LibreSSL.

Presently, LibreSSL does not have working support for RSA-PSS,
so disable that test.  Per discussion at
https://marc.info/?l=libressl&m=174664225002441&w=2
they do intend to fix this, but it's a ways off yet.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/95129709fd9b153226c1874549d37fa9246b78aa

Modified Files
--
src/test/ssl/t/002_scram.pl | 6 ++
1 file changed, 6 insertions(+)



pgsql: Centralize ssl tests' check for whether we're using LibreSSL.

2025-05-09 Thread Tom Lane
Centralize ssl tests' check for whether we're using LibreSSL.

Right now there's only one caller, so that this is merely
an exercise in shoving code from one module to another,
but there will shortly be another one.  It seems better to
avoid having two copies of this highly-subject-to-change test.

Back-patch to v15, where we first introduced some tests that
don't work with LibreSSL.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com
Backpatch-through: 15

Branch
--
REL_15_STABLE

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

Modified Files
--
src/test/ssl/t/SSL/Backend/OpenSSL.pm | 20 
src/test/ssl/t/SSL/Server.pm  | 17 +
2 files changed, 37 insertions(+)



pgsql: Hack one ssl test case to pass with current LibreSSL.

2025-05-09 Thread Tom Lane
Hack one ssl test case to pass with current LibreSSL.

With LibreSSL, our test of error logging for cert chain depths > 0
reports the wrong certificate.  This is almost certainly their bug
not ours, so just tweak the test to accept their answer.

No back-patch needed, since this test case wasn't enabled before
e0f373ee4.

Reported-by: Thomas Munro 
Author: Tom Lane 
Reviewed-by: Daniel Gustafsson 
Discussion: 
https://postgr.es/m/ca+hukg+flqywehqfsbcerueuvt0vdusnwui-ysz3+d_apmq...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/75d73331d0146871c846e849be626cb220e7e013

Modified Files
--
src/test/ssl/t/001_ssltests.pl | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)



pgsql: doc PG 18 relnotes: mv. hash joins and GROUP BY item to General

2025-05-09 Thread Bruce Momjian
doc PG 18 relnotes:  mv. hash joins and GROUP BY item to General

Reported-by: David Rowley

Discussion: 
https://postgr.es/m/CAApHDvqJz+Zf7a6abisqoTGottDSRD+YPx=aqsgcsckd476...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/99ddf8615c215bb81655574b9a9f7e8ebb2cb89e

Modified Files
--
doc/src/sgml/release-18.sgml | 56 ++--
1 file changed, 28 insertions(+), 28 deletions(-)



pgsql: injection_points: Add support and tests for runtime arguments

2025-05-09 Thread Michael Paquier
injection_points: Add support and tests for runtime arguments

This commit provides some test coverage for the runtime arguments of
injection points, for both INJECTION_POINT_CACHED() and
INJECTION_POINT(), as extended in 371f2db8b05e.

The SQL functions injection_points_cached() and injection_points_run()
are extended so as it is possible to pass an optional string value to
them.

Reviewed-by: Greg Burd 
Discussion: https://postgr.es/m/z_y9ttnxubvya...@paquier.xyz

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/36e5fda6326045f4523568d4c9d682ee5d2f0867

Modified Files
--
.../injection_points/expected/injection_points.out | 45 ++
.../injection_points/injection_points--1.0.sql | 10 +++--
.../modules/injection_points/injection_points.c| 38 +++---
.../injection_points/sql/injection_points.sql  | 10 +
4 files changed, 93 insertions(+), 10 deletions(-)



pgsql: aio: Use runtime arguments with injections points in tests

2025-05-09 Thread Michael Paquier
aio: Use runtime arguments with injections points in tests

This cleans up the code related to the testing infrastructure of AIO
that used injection points, switching the test code to use the new
facility for injection points added by 371f2db8b05e rather than tweaks
to pass and reset arguments to the callbacks run.

This removes all the dependencies to USE_INJECTION_POINTS in the AIO
code.  pgaio_io_call_inj(), pgaio_inj_io_get() and pgaio_inj_cur_handle
are now gone.

Reviewed-by: Greg Burd 
Discussion: https://postgr.es/m/z_y9ttnxubvya...@paquier.xyz

Branch
--
master

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

Modified Files
--
src/backend/storage/aio/aio.c   | 58 ++---
src/backend/storage/aio/method_worker.c |  3 +-
src/include/storage/aio_internal.h  | 20 
src/test/modules/test_aio/test_aio.c|  4 +--
4 files changed, 5 insertions(+), 80 deletions(-)



pgsql: doc: Put new options in consistent order on man pages

2025-05-09 Thread Peter Eisentraut
doc: Put new options in consistent order on man pages

Branch
--
master

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

Modified Files
--
doc/src/sgml/ref/pg_combinebackup.sgml |  58 +++
doc/src/sgml/ref/pg_resetwal.sgml  |  94 +--
doc/src/sgml/ref/pg_restore.sgml   | 276 -
doc/src/sgml/ref/pg_verifybackup.sgml  |  58 +++
doc/src/sgml/ref/pgupgrade.sgml| 102 ++--
5 files changed, 294 insertions(+), 294 deletions(-)