Logs contain full queries, with redacted value literals
We currently redact the query field entirely, and SELECT/UPDATE/INSERT statements from message + detail fields in postgres CSV logs. Ideally, we'd be able to see the structure of the query, although value literals must be redacted in case they contain senstive content.
For example: SELECT * FROM tokens WHERE token = 'literal_value'
would be logged as SELECT * FROM tokens WHERE token = 'REDACTED'
.
Follow-on to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9529