pgcrypto: make expensive functions respect context cancellation #111073
Labels
A-sql-builtins
SQL built-in functions and semantics thereof.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Is your feature request related to a problem? Please describe.
When using the crypto gen_salt function setting the iter_count to the higher end of acceptable values can take a very long time to complete. While these values aren't normally in use, if an operator does decide to use one, then this can lock the cluster into a pretty resource intensive operation until it completes or the cluster is restarted.
Describe the solution you'd like
Ideally we would be able to interrupt these functions. It seems like the two possible solutions are to fork bcrypt or to wait for something like this pull request to be released in a newer version of go.
Jira issue: CRDB-31750
The text was updated successfully, but these errors were encountered: