pgsql: Prevent lwlock dtrace probes from unnecessary work

2021-05-03 Thread Peter Eisentraut
Prevent lwlock dtrace probes from unnecessary work If dtrace is compiled in but disabled, the lwlock dtrace probes still evaluate their arguments. Since PostgreSQL 13, T_NAME(lock) does nontrivial work, so it should be avoided if not needed. To fix, make these calls conditional on the *_ENABLED(

pgsql: Update query_id computation

2021-05-03 Thread Bruce Momjian
Update query_id computation Properly fix: - the "ONLY" in FROM [ONLY] isn't hashed - the agglevelsup field in GROUPING isn't hashed - WITH TIES not being hashed (new in PG 13) - "DISTINCT" in "GROUP BY [DISTINCT]" isn't hashed (new in PG 14) Reported-by: Julien Rouhaud Discussion: https://postg

pgsql: doc: Add index entry for "multirange type"

2021-05-03 Thread Peter Eisentraut
doc: Add index entry for "multirange type" Before now, looking up "multirange" in the index only led to the multirange() function. To make this more useful, also add an entry pointing to the range types section. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5df6a

pgsql: amcheck: Improve some confusing reports about TOAST problems.

2021-05-03 Thread Robert Haas
amcheck: Improve some confusing reports about TOAST problems. Don't phrase reports in terms of the number of tuples thus-far returned by the index scan, but rather in terms of the chunk_seq values found inside the tuples. Patch by me, reviewed by Mark Dilger. Discussion: http://postgr.es/m/ca+t

pgsql: Fix performance issue in new regex match-all detection code.

2021-05-03 Thread Tom Lane
Fix performance issue in new regex match-all detection code. Commit 824bf7190 introduced a new search of the NFAs generated by regex compilation. I failed to think hard about the performance characteristics of that search, with the predictable outcome that it's bad: weird regexes can trigger expo

pgsql: Prevent lwlock dtrace probes from unnecessary work

2021-05-03 Thread Peter Eisentraut
Prevent lwlock dtrace probes from unnecessary work If dtrace is compiled in but disabled, the lwlock dtrace probes still evaluate their arguments. Since PostgreSQL 13, T_NAME(lock) does nontrivial work, so it should be avoided if not needed. To fix, make these calls conditional on the *_ENABLED(

pgsql: Remove unused function argument

2021-05-03 Thread Peter Eisentraut
Remove unused function argument became unused by 04942bffd0aa9bd0d143d99b473342eb9ecee88b Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c285babf8f44d86b7fd1e73e9e4f94456b825bfb Modified Files -- src/backend/rewrite/rewriteHandler.c | 6 -- 1 file c