pgsql: doc PG 17 relnotes: clarify pg_upgrade and logical slot preserv.

2024-10-09 Thread Bruce Momjian
doc PG 17 relnotes: clarify pg_upgrade and logical slot preserv. Reported-by: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1+bChgccySmcm0LbvkmBDJ3ufsLneF4iNa_aZ7t2P6=8...@mail.gmail.com Backpatch-through: 17 only Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: doc PG 17 relnotes: add missing commands for safe search path

2024-10-09 Thread Bruce Momjian
doc PG 17 relnotes: add missing commands for safe search path Reported-by: Yugo NAGATA Discussion: https://postgr.es/m/20240926141921.57d0b430fa53ac4389344...@sraoss.co.jp Backpatch-through: 17 only Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7e059fb6

pgsql: Avoid crash in estimate_array_length with null root pointer.

2024-10-09 Thread Tom Lane
Avoid crash in estimate_array_length with null root pointer. Commit 9391f7152 added a "PlannerInfo *root" parameter to estimate_array_length, but failed to consider the possibility that NULL would be passed for that, leading to a null pointer dereference. We could rectify the particular case show

pgsql: Avoid crash in estimate_array_length with null root pointer.

2024-10-09 Thread Tom Lane
Avoid crash in estimate_array_length with null root pointer. Commit 9391f7152 added a "PlannerInfo *root" parameter to estimate_array_length, but failed to consider the possibility that NULL would be passed for that, leading to a null pointer dereference. We could rectify the particular case show

pgsql: Apply GUC name from central table in more places of guc.c

2024-10-09 Thread Michael Paquier
Apply GUC name from central table in more places of guc.c The name extracted from the record of the GUC tables is applied to more internal places of guc.c. This change has the advantage to simplify parse_and_validate_value(), where the "name" was only used in elog messages, while it was required

pgsql: Allow pushdown of HAVING clauses with grouping sets

2024-10-09 Thread Richard Guo
Allow pushdown of HAVING clauses with grouping sets In some cases, we may want to transfer a HAVING clause into WHERE in hopes of eliminating tuples before aggregation instead of after. Previously, we couldn't do this if there were any nonempty grouping sets, because we didn't have a way to tell

pgsql: Consider explicit incremental sort for mergejoins

2024-10-09 Thread Richard Guo
Consider explicit incremental sort for mergejoins For a mergejoin, if the given outer path or inner path is not already well enough ordered, we need to do an explicit sort. Currently, we only consider explicit full sort and do not account for incremental sort. In this patch, for the outer path o

pgsql: doc: Fix mention of AT LOCAL in release notes

2024-10-09 Thread Daniel Gustafsson
doc: Fix mention of AT LOCAL in release notes The release notes accidentally spelled AT LOCAL as AS LOCAL. Reported-by: Takatsuka Haruka Discussion: https://postgr.es/m/18649-4d146d83086d4...@postgresql.org Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/64

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w

pgsql: Remove incorrect function import from pgindent

2024-10-09 Thread Daniel Gustafsson
Remove incorrect function import from pgindent Commit 149ac7d4559 which re-implemented pgindent in Perl explicitly imported the devnull function from File::Spec, but the module does not export anything. In recent versions of Perl calling a missing import function cause a warning, which combined w