This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent concurrent table creation errors for long metric name
Previously, when two metrics with really long names were created concurrently, postgres could throw errors due to name collision violations when it created constraint names as well as type names for the type corresponding to the table. Constraint names was fixed by explicitly assigning a unique constraint name instead of having PG autogenerate one. Types are a bit trickier. Turns out for every table X, PG assigns an array type '_X' (makeArrayTypeName() in PG source). That can also collide and cause erroors. The fix was for us to change the max length of the table names we geneate from 63 chars to 62 chars, thus reserving one char for the underscore.
- Loading branch information
Showing
4 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters