pgsql: Fix use of OPENSSL in SSL tests if command is not found

2023-11-08 Thread Michael Paquier
Fix use of OPENSSL in SSL tests if command is not found `openssl` is an optional dependency in the meson build as it may not be installed in an environment even if SSL libraries are around. The meson scripts assume that, but the SSL tests thought that it was a hard dependency, causing a meson ins

pgsql: Fix use of OPENSSL in SSL tests if command is not found

2023-11-08 Thread Michael Paquier
Fix use of OPENSSL in SSL tests if command is not found `openssl` is an optional dependency in the meson build as it may not be installed in an environment even if SSL libraries are around. The meson scripts assume that, but the SSL tests thought that it was a hard dependency, causing a meson ins

pgsql: Don't install ldap_password_func in meson

2023-11-08 Thread Peter Eisentraut
Don't install ldap_password_func in meson It should be handled as a test module per commit b6a0d469ca. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b7caeaff31ea1d0d0899241f30452353b78e840a Modified Files -- src/test/modules/ldap_password_func/

pgsql: Don't install ldap_password_func in meson

2023-11-08 Thread Peter Eisentraut
Don't install ldap_password_func in meson It should be handled as a test module per commit b6a0d469ca. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e9f075f9a15593fe31c610e15cfc71a5fa281ede Modified Files -- src/test/modules/ldap_password_func/meson.b

pgsql: Move a few ResourceOwnerEnlarge() calls for safety and clarity.

2023-11-08 Thread Heikki Linnakangas
Move a few ResourceOwnerEnlarge() calls for safety and clarity. These are functions where a lot of things happen between the ResourceOwnerEnlarge and ResourceOwnerRemember calls. It's important that there are no unrelated ResourceOwnerRemember calls in the code in between, otherwise the reserved e

pgsql: Change pgcrypto to use the new ResourceOwner mechanism.

2023-11-08 Thread Heikki Linnakangas
Change pgcrypto to use the new ResourceOwner mechanism. This is a nice example of how extensions can now use ResourceOwners to track extension-specific resource kinds Reviewed-by: Peter Eisentraut, Andres Freund Discussion: https://www.postgresql.org/message-id/d746cead-a1ef-7efe-fb47-933311e876

pgsql: Use a faster hash function in resource owners.

2023-11-08 Thread Heikki Linnakangas
Use a faster hash function in resource owners. This buys back some of the performance loss that we otherwise saw from the previous commit. Reviewed-by: Aleksander Alekseev, Michael Paquier, Julien Rouhaud Reviewed-by: Kyotaro Horiguchi, Hayato Kuroda, Álvaro Herrera, Zhihong Yu Reviewed-by: Peter

pgsql: Make ResourceOwners more easily extensible.

2023-11-08 Thread Heikki Linnakangas
Make ResourceOwners more easily extensible. Instead of having a separate array/hash for each resource kind, use a single array and hash to hold all kinds of resources. This makes it possible to introduce new resource "kinds" without having to modify the ResourceOwnerData struct. In particular, thi

pgsql: Tag refs/tags/REL_14_10 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_14_10 was created.

pgsql: Tag refs/tags/REL_15_5 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_15_5 was created.

pgsql: Tag refs/tags/REL_11_22 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_11_22 was created.

pgsql: Tag refs/tags/REL_13_13 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_13_13 was created.

pgsql: Tag refs/tags/REL_16_1 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_16_1 was created.

pgsql: Tag refs/tags/REL_12_17 was created

2023-11-08 Thread noreply
Tag refs/tags/REL_12_17 was created.

pgsql: Call pqPipelineFlush from PQsendFlushRequest

2023-11-08 Thread Alvaro Herrera
Call pqPipelineFlush from PQsendFlushRequest When PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued against adding a PQflush() call in it[1]. This is still the right decision: if the user wants a flush to occur, they can just call that. However, we failed to realize that the messag

pgsql: Call pqPipelineFlush from PQsendFlushRequest

2023-11-08 Thread Alvaro Herrera
Call pqPipelineFlush from PQsendFlushRequest When PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued against adding a PQflush() call in it[1]. This is still the right decision: if the user wants a flush to occur, they can just call that. However, we failed to realize that the messag

pgsql: Call pqPipelineFlush from PQsendFlushRequest

2023-11-08 Thread Alvaro Herrera
Call pqPipelineFlush from PQsendFlushRequest When PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued against adding a PQflush() call in it[1]. This is still the right decision: if the user wants a flush to occur, they can just call that. However, we failed to realize that the messag

pgsql: Call pqPipelineFlush from PQsendFlushRequest

2023-11-08 Thread Alvaro Herrera
Call pqPipelineFlush from PQsendFlushRequest When PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued against adding a PQflush() call in it[1]. This is still the right decision: if the user wants a flush to occur, they can just call that. However, we failed to realize that the messag

pgsql: Fix some issues with tracking nesting level in pg_stat_statement

2023-11-08 Thread Tom Lane
Fix some issues with tracking nesting level in pg_stat_statements. When we decide that we don't want to track execution time of a specific planner or ProcessUtility call, we still have to increment the nesting depth, or we'll make the wrong determination of whether we are at top level when conside

pgsql: Check stack depth in new recursive functions

2023-11-08 Thread Alvaro Herrera
Check stack depth in new recursive functions Commit b0e96f311985 introduced a bunch of recursive functions, but failed to make them check for stack depth. This can cause the backend to crash when operating on inheritance hierarchies several thousands deep. Protect the code by adding the missing

pgsql: doc: mention that ANALYZE does block DDL

2023-11-08 Thread Bruce Momjian
doc: mention that ANALYZE does block DDL Reported-by: Aramaki Zyake Discussion: https://postgr.es/m/156628723253.1296.7377373462603881976%40wrigleys.postgresql.org Author: Aramaki Zyake Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5

pgsql: doc: change "system" to "cluster" where appropriate

2023-11-08 Thread Bruce Momjian
doc: change "system" to "cluster" where appropriate Reported-by: Jeff Davis Discussion: https://postgr.es/m/[email protected] Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3a236fc9f39eb9eb39c1a

pgsql: README: remove duplicate download link & mention related softw.

2023-11-08 Thread Bruce Momjian
README: remove duplicate download link & mention related softw. Reported-by: Daniel Westermann Discussion: https://postgr.es/m/db6pr0902mb2184f7965c9ea9070acfca43d2...@db6pr0902mb2184.eurprd09.prod.outlook.com Backpatch-through: master Branch -- master Details --- https://git.postgre

pgsql: doc:: simplify introductory text

2023-11-08 Thread Bruce Momjian
doc:: simplify introductory text Reported-by: Joshua D. Drake Discussion: https://postgr.es/m/[email protected] Author: Joshua D. Drake Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/322f55bdbd018b

pgsql: Fix bug in the new ResourceOwner implementation.

2023-11-08 Thread Heikki Linnakangas
Fix bug in the new ResourceOwner implementation. When the hash table is in use, ResoureOwnerSort() moves any elements from the small fixed-size array to the hash table, and sorts it. When the hash table is not in use, it sorts the elements in the small fixed-size array directly. However, ResourceO

pgsql: pg_stat_statements: Remove duplicated tests for SET statements

2023-11-08 Thread Michael Paquier
pg_stat_statements: Remove duplicated tests for SET statements This looks like a copy-paste mistake introduced in de2aca288569, that has added checks for more patterns of SET statements while ignoring the original test block that existed. Backpatch down to where this has been introduced, as this

pgsql: pg_stat_statements: Remove duplicated tests for SET statements

2023-11-08 Thread Michael Paquier
pg_stat_statements: Remove duplicated tests for SET statements This looks like a copy-paste mistake introduced in de2aca288569, that has added checks for more patterns of SET statements while ignoring the original test block that existed. Backpatch down to where this has been introduced, as this

pgsql: Fix uninitialized slot array access during the upgrade.

2023-11-08 Thread Amit Kapila
Fix uninitialized slot array access during the upgrade. Commit 29d0a77fa introduced fetching slot information from the old cluster but didn't initialize the required array in all the code paths. So when trying to access the array in verbose mode for the new cluster, it leads to an uninitialized me