Allow for prepared statements and query log tags

Rails disables prepared statements when query log tags are enabled. This feels like a safe and reasonable default as it helps to avoid the situation where high cardinality comments are generated. However, I think it could be nice to allow projects to opt-in to query log tags while maintaining prepared statements. The current defaults should stay as is. Currently, for a project wishing to have query log tags and prepared statements they need to reach for adding marginalia manually or overriding the native behavior to keep prepared statements enabled. Thoughts?

I realize I’m doing this a bit backwards as there may not be much interest in it but here’s the PR for review. Allow prepared statements with query log tags by bschrag620 · Pull Request #58274 · rails/rails · GitHub