pgsql: Pre-beta2 mechanical code beautification.

2023-06-20 Thread Tom Lane
Pre-beta2 mechanical code beautification. Run pgindent and pgperltidy. It seems we're still some ways away from all committers doing this automatically. Now that we have a buildfarm animal that will whine about poorly-indented code, we'll try to keep the tree more tidy. Discussion: https://post

pgsql: Add b334612b8 to .git-blame-ignore-revs.

2023-06-20 Thread Tom Lane
Add b334612b8 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/596114164699bbe184969df374fd6a1d8a93a57c Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Centralize fixups for mismatched nullingrels in nestloop params.

2023-06-20 Thread Tom Lane
Centralize fixups for mismatched nullingrels in nestloop params. It turns out that the fixes we applied in commits bfd332b3f and 63e4f13d2 were not nearly enough to solve the problem. We'd focused narrowly on subquery RTEs with lateral references, but lateral references can occur in several other

pgsql: Don't include outer join relids in lateral_relids bitmapsets.

2023-06-20 Thread Tom Lane
Don't include outer join relids in lateral_relids bitmapsets. This avoids an assertion failure when outer joins are rearranged per identity 3. Listing only the baserels from a PlaceHolderVar's ph_lateral set should be enough to ensure that the required values are available when we need to compute

pgsql: Fix another cause of "wrong varnullingrels" planner failures.

2023-06-20 Thread Tom Lane
Fix another cause of "wrong varnullingrels" planner failures. I removed the delay_upper_joins mechanism in commit b448f1c8d, reasoning that it was only needed when we have a single-table (SELECT ... WHERE) as the immediate RHS child of a left join, and we could get rid of that by hoisting the WHER

pgsql: docs: adjust tag indenting and add MERGE mention

2023-06-20 Thread Bruce Momjian
docs: adjust tag indenting and add MERGE mention Discussion: https://postgr.es/m/CAMpnoC4_WsY3gsY+ud-Z0GDbafR=k7t7cxn2gateqfnsrny...@mail.gmail.com Author: Will Mortensen Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8a300fc3afce4a0fe8a4c55bc22b2aeec092cf23 Mo

pgsql: docs: adjust tag indenting and add MERGE mention

2023-06-20 Thread Bruce Momjian
docs: adjust tag indenting and add MERGE mention Discussion: https://postgr.es/m/CAMpnoC4_WsY3gsY+ud-Z0GDbafR=k7t7cxn2gateqfnsrny...@mail.gmail.com Author: Will Mortensen Backpatch-through: 15 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/39abe1401e3180

pgsql: Fix hash join when inner hashkey expressions contain Params.

2023-06-20 Thread Tom Lane
Fix hash join when inner hashkey expressions contain Params. If the inner-side expressions contain PARAM_EXEC Params, we must re-hash whenever the values of those Params change. The executor mechanism for that exists already, but we failed to invoke it because finalize_plan() neglected to search

pgsql: Fix hash join when inner hashkey expressions contain Params.

2023-06-20 Thread Tom Lane
Fix hash join when inner hashkey expressions contain Params. If the inner-side expressions contain PARAM_EXEC Params, we must re-hash whenever the values of those Params change. The executor mechanism for that exists already, but we failed to invoke it because finalize_plan() neglected to search

pgsql: Fix hash join when inner hashkey expressions contain Params.

2023-06-20 Thread Tom Lane
Fix hash join when inner hashkey expressions contain Params. If the inner-side expressions contain PARAM_EXEC Params, we must re-hash whenever the values of those Params change. The executor mechanism for that exists already, but we failed to invoke it because finalize_plan() neglected to search

pgsql: Fix hash join when inner hashkey expressions contain Params.

2023-06-20 Thread Tom Lane
Fix hash join when inner hashkey expressions contain Params. If the inner-side expressions contain PARAM_EXEC Params, we must re-hash whenever the values of those Params change. The executor mechanism for that exists already, but we failed to invoke it because finalize_plan() neglected to search

pgsql: Fix hash join when inner hashkey expressions contain Params.

2023-06-20 Thread Tom Lane
Fix hash join when inner hashkey expressions contain Params. If the inner-side expressions contain PARAM_EXEC Params, we must re-hash whenever the values of those Params change. The executor mechanism for that exists already, but we failed to invoke it because finalize_plan() neglected to search

pgsql: Move bool parameter for vacuum_rel() to option bits.

2023-06-20 Thread Nathan Bossart
Move bool parameter for vacuum_rel() to option bits. ff9618e82a introduced the skip_privs parameter, which is used to skip privilege checks when recursing to a relation's TOAST table. This parameter should have been added as a flag bit in VacuumParams->options instead. Suggested-by: Michael Paqui

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug

pgsql: Fix the errhint message and docs for drop subscription failure.

2023-06-20 Thread Amit Kapila
Fix the errhint message and docs for drop subscription failure. The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-throug