cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.1k stars 3.81k forks source link

sql: Allow more fine grained access over statement types for audit logging #49308

Open piyush-singh opened 4 years ago

piyush-singh commented 4 years ago

A customer recently requested the ability to enable or disable audit logging per SQL statement type. The request was primarily focused on DML - the user wanted to distinguish between destructive statements (DELETEs and TRUNCATEs) without enabling logging for INSERTs for example.

Jira issue: CRDB-4241

Epic CRDB-32141

knz commented 4 years ago

FYI INSERT can be destructive with INSERT ON CONFLICT.

Can we have a bit more details about the use case? What is the problem they'd like to solve? What was the issue with having a full audit log and then filtering the log by statement type?

knz commented 4 years ago

@thtruo @piyush-singh can you add more color to this issue: what is the actual problem they are trying to solve -- why do they care and what is the impact of not doing this.

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!