Skip to content

Conversation

kaustubhbabar5
Copy link
Contributor

@kaustubhbabar5 kaustubhbabar5 commented Aug 3, 2025

Currently, CockroachDB only supports cluster-wide row size guardrails. However, different tables, databases may have different requirements:
Addresses #137518

sql: add table-level row size guardrails

  • Introduces table-level row size guardrails that allow users to configure row size limits on a per-table basis
  • This change adds two new table storage parameters:
    • max_row_size_log: Log a warning when a row exceeds this size (overrides cluster setting)
    • max_row_size_err: Return an error when a row exceeds this size (overrides cluster setting)
  • SQL syntax
    • Both parameters can be
      • set via CREATE TABLE ... WITH (max_row_size_log = '10MB', max_row_size_err = '50MB');
      • altered by ALTER TABLE user_profiles SET (max_row_size_log = '10MB', max_row_size_err = '50MB');

Prioritizes guardrails in following order

  1. table-level
  2. cluster-level

Copy link

blathers-crl bot commented Aug 3, 2025

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

Before a member of our team reviews your PR, I have some potential action items for you:

  • We notice you have more than one commit in your PR. We try break logical changes into separate commits, but commits such as "fix typo" or "address review commits" should be squashed into one commit and pushed with --force
  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

I have added a few people who may be able to assist in reviewing:

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-triaged blathers was able to find an owner labels Aug 3, 2025
@blathers-crl blathers-crl bot requested a review from dikshant August 3, 2025 05:10
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@DrewKimball DrewKimball added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Aug 11, 2025
@yuzefovich yuzefovich requested a review from a team August 13, 2025 02:17
Copy link

blathers-crl bot commented Aug 30, 2025

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

Thank you for updating your pull request.

Before a member of our team reviews your PR, I have some potential action items for you:

  • We notice you have more than one commit in your PR. We try break logical changes into separate commits, but commits such as "fix typo" or "address review commits" should be squashed into one commit and pushed with --force
  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@kaustubhbabar5 kaustubhbabar5 force-pushed the table-level-guardrails branch from f692f8c to 4727f3e Compare August 30, 2025 16:46
Copy link

blathers-crl bot commented Aug 30, 2025

Thank you for updating your pull request.

Before a member of our team reviews your PR, I have some potential action items for you:

  • We notice you have more than one commit in your PR. We try break logical changes into separate commits, but commits such as "fix typo" or "address review commits" should be squashed into one commit and pushed with --force
  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@kaustubhbabar5 kaustubhbabar5 changed the title sql: add table-level and database-level max_row_size guardrails sql: add table-level max_row_size guardrails Aug 30, 2025
@kaustubhbabar5 kaustubhbabar5 force-pushed the table-level-guardrails branch from 4727f3e to 4ade614 Compare August 30, 2025 17:46
Copy link

blathers-crl bot commented Aug 30, 2025

Thank you for updating your pull request.

Before a member of our team reviews your PR, I have some potential action items for you:

  • We notice you have more than one commit in your PR. We try break logical changes into separate commits, but commits such as "fix typo" or "address review commits" should be squashed into one commit and pushed with --force
  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@kaustubhbabar5 kaustubhbabar5 marked this pull request as ready for review August 30, 2025 17:47
@kaustubhbabar5 kaustubhbabar5 requested a review from a team as a code owner August 30, 2025 17:47
@kaustubhbabar5 kaustubhbabar5 requested review from mgartner and removed request for a team August 30, 2025 17:47
@kaustubhbabar5
Copy link
Contributor Author

I'll be adding database-level guardrails in separate PR. this PR is ready for review

@mgartner mgartner requested review from a team and removed request for dikshant September 15, 2025 15:26
@mgartner mgartner removed their request for review September 22, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants