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

Building PK's Concurrently for Partitions #65

Merged
merged 5 commits into from
Aug 31, 2023

Conversation

bplunkett-stripe
Copy link
Collaborator

Description

Build PK constraints concurrently for partitions. This will nicely transition into adding unique constraint support and building unique constraints concurrently for partitions.

Motivation

#64

Testing

Tested via acceptance tests

@@ -132,14 +135,13 @@ INNER JOIN
INNER JOIN pg_catalog.pg_namespace AS foreign_table_namespace
ON
foreign_table_c.relnamespace = foreign_table_namespace.oid
INNER JOIN
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This join isn't used for anything

@bplunkett-stripe bplunkett-stripe force-pushed the bplunkett/unique-constraint-support branch from 19834a9 to 2b8fa27 Compare August 29, 2023 19:24
@bplunkett-stripe bplunkett-stripe force-pushed the bplunkett/unique-constraint-support branch from 2b8fa27 to fba4fe3 Compare August 29, 2023 19:29
@bplunkett-stripe bplunkett-stripe force-pushed the bplunkett/unique-constraint-support branch from fba4fe3 to b1cdda9 Compare August 29, 2023 22:29
Comment on lines +626 to +627
id INT NOT NULL,
foo VARCHAR(255) NOT NULL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this indent for foo correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the entire file is messed up. It renders okay in my editor...I'm guessing this is using tabs instead of spaces, which happens to align okay in my editor. I'll fix in a subsequent PR

)

const (
PkIndexConstraintType IndexConstraintType = "PRIMARY KEY"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: Should IndexConstraintType and PkIndexConstraintType be public if IsPk is public? Seems like the current pattern so no need to change for this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently use it to generate the constraint definition. This should be useful when we add support for unique constraints

@bplunkett-stripe bplunkett-stripe merged commit 51e16f6 into main Aug 31, 2023
5 checks passed
@bplunkett-stripe bplunkett-stripe deleted the bplunkett/unique-constraint-support branch August 31, 2023 20:18
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.

2 participants