pgsql: Improve new hash partition bound check error messages

2021-02-21 Thread Peter Eisentraut
Improve new hash partition bound check error messages For the error message "every hash partition modulus must be a factor of the next larger modulus", add a detail message that shows the particular numbers and existing partition involved. Also comment the code more. Reviewed-by: Amit Langote R

pgsql: Use pgstat_progress_update_multi_param() where possible

2021-02-21 Thread Michael Paquier
Use pgstat_progress_update_multi_param() where possible This commit changes one code path in REINDEX INDEX and one code path in CREATE INDEX CONCURRENTLY to report the progress of each operation using pgstat_progress_update_multi_param() rather than multiple calls to pgstat_progress_update_param()

pgsql: Remove outdated reference to RAID spindles.

2021-02-21 Thread Thomas Munro
Remove outdated reference to RAID spindles. Commit b09ff536 left behind some outdated advice in the long_desc field of the GUC "effective_io_concurrency". Remove it. Back-patch to 13. Reported-by: Andrew Gierth Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/CA%2BhUKGJyyWqFBxL9gE

pgsql: Remove outdated reference to RAID spindles.

2021-02-21 Thread Thomas Munro
Remove outdated reference to RAID spindles. Commit b09ff536 left behind some outdated advice in the long_desc field of the GUC "effective_io_concurrency". Remove it. Back-patch to 13. Reported-by: Andrew Gierth Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/CA%2BhUKGJyyWqFBxL9gE

pgsql: Simplify memory management for regex DFAs a little.

2021-02-21 Thread Tom Lane
Simplify memory management for regex DFAs a little. Coverity complained that functions in regexec.c might leak DFA storage. It's wrong, but this logic is confusing enough that it's not so surprising Coverity couldn't make sense of it. Rewrite in hopes of making it more legible to humans as well

pgsql: Fix invalid array access in trgm_regexp.c.

2021-02-21 Thread Tom Lane
Fix invalid array access in trgm_regexp.c. Brown-paper-bag bug in 08c0d6ad6: I missed one place that needed to guard against RAINBOW arc colors. Remarkably, nothing noticed the invalid array access except buildfarm member thorntail. Thanks to Noah Misch for assistance with tracking this down. B