Skip to content

Add opt-in PostgreSQL name length limit support#6503

Open
sdemjanenko wants to merge 1 commit into
Effect-TS:mainfrom
sdemjanenko:cluster-sql-identifier-limit
Open

Add opt-in PostgreSQL name length limit support#6503
sdemjanenko wants to merge 1 commit into
Effect-TS:mainfrom
sdemjanenko:cluster-sql-identifier-limit

Conversation

@sdemjanenko

@sdemjanenko sdemjanenko commented Jul 20, 2026

Copy link
Copy Markdown

Long table, index and constraint names get silently truncated in Postgres and this could lead to collisions. Short names within the length limit are unchanged.

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Depending on a user-provided "prefix" for the workflow cluster, it is possible that the generated names for tables, indices and constraints are too long for Postgres and will be cut-off or lead to execution errors.

Summary by CodeRabbit

  • New Features
    • Added an opt-in limitIdentifiers setting for SQL message storage.
    • Long PostgreSQL table, index, and constraint names can now be shortened with stable hash suffixes to meet the 63-character limit.
    • Default naming behavior remains unchanged.

@sdemjanenko
sdemjanenko requested a review from tim-smart as a code owner July 20, 2026 17:03
@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog Jul 20, 2026
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 04f3901

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
effect Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/vitest Major
@effect/ai-anthropic Major
@effect/ai-openai-compat Major
@effect/ai-openai Major
@effect/ai-openrouter Major
@effect/atom-react Major
@effect/atom-solid Major
@effect/atom-vue Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-pglite Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/openapi-generator Major
@effect/docgen Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d1258e90-1204-4cfa-a378-ce705d18226c

📥 Commits

Reviewing files that changed from the base of the PR and between 2e74d1f and 04f3901.

📒 Files selected for processing (1)
  • .changeset/cluster-sql-identifier-limit.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/cluster-sql-identifier-limit.md

📝 Walkthrough

Walkthrough

Adds a Changesets entry for @effect/cluster documenting an opt-in limitIdentifiers setting for SqlMessageStorage, which bounds PostgreSQL identifiers to 63 characters with stable hash suffixes while preserving default naming.

Changes

SQL identifier limit release metadata

Layer / File(s) Summary
Release metadata
.changeset/cluster-sql-identifier-limit.md
Declares a minor release change and documents the opt-in limitIdentifiers behavior for bounded PostgreSQL identifiers with stable hash suffixes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: enhancement

Suggested reviewers: tim-smart

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 20, 2026
@sdemjanenko

Copy link
Copy Markdown
Author

I decided to add this as an opt-in option because I didn't want to break existing installs, but I could see down the road this becomes a default option.

@sdemjanenko
sdemjanenko changed the base branch from v3 to main July 20, 2026 17:20
@tim-smart

Copy link
Copy Markdown
Contributor

Looks like the branch needs a clean rebase.

Long table, index and constraint names get silently truncated in
Postgres and this could lead to collisions. Short names within the
length limit are unchanged.
@sdemjanenko
sdemjanenko force-pushed the cluster-sql-identifier-limit branch from 2e74d1f to 04f3901 Compare July 24, 2026 18:11
@github-actions github-actions Bot added the 4.0 label Jul 24, 2026
@sdemjanenko

Copy link
Copy Markdown
Author

@tim-smart i've rebased it on top of main. Would love a backport to the v3 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0 enhancement New feature or request

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

2 participants