pgsql: Generalize index support in network support function

2025-03-24 Thread Peter Eisentraut
Generalize index support in network support function The network (inet) support functions currently only supported a hardcoded btree operator family. With the generalized compare type facility, we can generalize this to support any operator family from any index type that supports the required op

pgsql: Add ExecCopySlotMinimalTupleExtra().

2025-03-24 Thread Jeff Davis
Add ExecCopySlotMinimalTupleExtra(). Allows an "extra" argument that allocates extra memory at the end of the MinimalTuple. This is important for callers that need to store additional data, but do not want to perform an additional allocation. Suggested-by: David Rowley Discussion: https://postg

pgsql: Add support for custom_query_jumble as a node field attribute

2025-03-24 Thread Michael Paquier
Add support for custom_query_jumble as a node field attribute This option gives the possibility for query jumble to define a custom routine for the field of a Node, extending support for custom_query_jumble as a node field attribute. When dealing with complex node structures, this can be simpler

pgsql: Remove 'additional' pointer from TupleHashEntryData.

2025-03-24 Thread Jeff Davis
Remove 'additional' pointer from TupleHashEntryData. Reduces memory required for hash aggregation by avoiding an allocation and a pointer in the TupleHashEntryData structure. That structure is used for all buckets, whether occupied or not, so the savings is substantial. Discussion: https://postg

pgsql: HashAgg: use Bump allocator for hash TupleHashTable entries.

2025-03-24 Thread Jeff Davis
HashAgg: use Bump allocator for hash TupleHashTable entries. The entries aren't freed until the entire hash table is destroyed, so use the Bump allocator to improve allocation speed, avoid wasting space on the chunk header, and avoid wasting space due to the power-of-two allocations. Discussion:

pgsql: Fix the typo in the test case added in 73eba5004a.

2025-03-24 Thread Amit Kapila
Fix the typo in the test case added in 73eba5004a. Author: vignesh C Discussion: https://postgr.es/m/CALDaNm2ms1deM5EYNLFEfESv_Kw=Y4AiTB0LP=qgs-upfwg...@mail.gmail.com Discussion: https://postgr.es/m/cabdarm7fw-_dnthgkg2s0fy1hhub8c3ela0gzx1kkbs1zzo...@mail.gmail.com Branch -- master Detai

pgsql: Fix an oversight in 3abe9dc188.

2025-03-24 Thread Amit Kapila
Fix an oversight in 3abe9dc188. Forgot to update the comment atop one of the functions. Author: Hayato Kuroda Discussion: https://postgr.es/m/oscpr01mb1496623be1125b44614494e7af5...@oscpr01mb14966.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/com

pgsql: postgres_fdw: Avoid pulling up restrict infos from subqueries

2025-03-24 Thread Alexander Korotkov
postgres_fdw: Avoid pulling up restrict infos from subqueries Semi-join joins below left/right join are deparsed as subqueries. Thus, we can't refer to subqueries vars from upper relations. This commit avoids pulling conditions from them. Reported-by: Robins Tharakan Bug: #18852 Discussion: ht

pgsql: postgres_fdw: Avoid pulling up restrict infos from subqueries

2025-03-24 Thread Alexander Korotkov
postgres_fdw: Avoid pulling up restrict infos from subqueries Semi-join joins below left/right join are deparsed as subqueries. Thus, we can't refer to subqueries vars from upper relations. This commit avoids pulling conditions from them. Reported-by: Robins Tharakan Bug: #18852 Discussion: ht

pgsql: Redefine max_files_per_process to control additionally opened fi

2025-03-24 Thread Andres Freund
Redefine max_files_per_process to control additionally opened files Until now max_files_per_process=N limited each backend to open N files in total (minus a safety factor), even if there were already more files opened in postmaster and inherited by backends. Change max_files_per_process to contro

pgsql: Allow pg_recvlogical --drop-slot to work without --dbname.

2025-03-24 Thread Fujii Masao
Allow pg_recvlogical --drop-slot to work without --dbname. When pg_recvlogical was introduced in 9.4, the --dbname option was not required for --drop-slot. Without it, pg_recvlogical --drop-slot connected using a replication connection (not tied to a specific database) and was able to drop both ph

pgsql: Expand comment for isset_offset.

2025-03-24 Thread Nathan Bossart
Expand comment for isset_offset. This field was added in commit 0164a0f9ee to provide a way to determine whether a storage parameter was explicitly set for the relation or if it just picked up the default value. In most cases, this can be accomplished by giving the storage parameter a special out

pgsql: Fix bitmapheapscan incorrect recheck of NULL tuples

2025-03-24 Thread Melanie Plageman
Fix bitmapheapscan incorrect recheck of NULL tuples The bitmap heap scan skip fetch optimization skips fetching the heap block when a page is set all-visible in the visibility map and no columns from the table are needed to satisfy the query. 2b73a8cd33b and c3953226a07 changed the control flow o

pgsql: Add tests for POSITION(bytea, bytea)

2025-03-24 Thread David Rowley
Add tests for POSITION(bytea, bytea) Previously there was no coverage for this function. Author: Aleksander Alekseev Reviewed-by: Peter Smith Reviewed-by: Rustam ALLAKOV Discussion: https://postgr.es/m/caj7c6tmt6xcoomvkncd_tr2obdgcnjefsecdcv8jzky9vkw...@mail.gmail.com Branch -- master D

pgsql: Fix typo

2025-03-24 Thread Álvaro Herrera
Fix typo Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0e3e0ec06b995f6809f315752cbf5ff67902e095 Modified Files -- src/test/authentication/t/001_password.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: doc: Clarify required options for each action in pg_recvlogical.

2025-03-24 Thread Fujii Masao
doc: Clarify required options for each action in pg_recvlogical. Each pg_recvlogical action requires specific options. For example, --slot, --dbname, and --file must be specified with the --start action. Previously, the documentation did not clearly outline these requirements. This commit updates

pgsql: postgres_fdw: improve security checks

2025-03-24 Thread Peter Eisentraut
postgres_fdw: improve security checks SCRAM pass-through should not bypass the FDW security check as it was implemented for postgres_fdw in commit 761c79508e7. This commit improves the security check by adding new SCRAM pass-through checks to ensure that the required SCRAM connection options are

pgsql: psql: show default extension version in \dx output

2025-03-24 Thread Magnus Hagander
psql: show default extension version in \dx output Reviewed-By: Julien Rouhaud Reviewed-By: Michael Banck Reviewed-By: Yugo Nagata Reviewed-By: Nathan Bossart Reviewed-By: Jelte Fennema-Nio Discussion: https://postgr.es/m/cabueveytmyxc6ovcwkj+rpnhrfi8_rw_+dd_jzgffnpqgf+...@mail.gmail.com Br

pgsql: psql: use consistent alias for pg_description

2025-03-24 Thread Magnus Hagander
psql: use consistent alias for pg_description Author:Jelte Fennema-Nio Suggested-By: Michael Banck Discussion: https://www.postgresql.org/message-id/67813520.170a0220.183245.7bf0%40mx.google.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a8eeb22f171437f11ca2

pgsql: Add test case for when subscriber table is missing a column

2025-03-24 Thread Heikki Linnakangas
Add test case for when subscriber table is missing a column We haven't had bugs in this area, but there's some not-entirely trivial code to detect that case, so it seems good to have test coverage for it. Author: Peter Smith Reviewed-by: vignesh C Reviewed-by: Tomas Vondra Discussion: https:/

pgsql: Detect and Log multiple_unique_conflicts type conflict.

2025-03-24 Thread Amit Kapila
Detect and Log multiple_unique_conflicts type conflict. Introduce a new conflict type, multiple_unique_conflicts, to handle cases where an incoming row during logical replication violates multiple UNIQUE constraints. Previously, the apply worker detected and reported only the first encountered ke