Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash slotname, if it exceeds 63 characters in streams #2808

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

johannesknauft
Copy link
Member

@johannesknauft johannesknauft commented Nov 27, 2024

The replication slot in Postgres is of type name, which has a char limit of 63. At the moment the inputs of the stream section are used to generate the slot name, they are constructed by combining fes_{dbname}_{app_id}. This easily can exceed 63 characters, as application ids tend to be longer in a microservice environment, and also db names can contain things like team-name, environment, and the same long app-id. To address this when using streams in the Postgres manifest, I created a PR that checks if this is the case and then hashes the slot name to ensure its length is always shorter than 63. This should result in the configuration not failing when applied.

I am also happy to discuss/implement other alternatives like:

  • Truncating
  • Shortening: long_application_id -> lai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant