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

Allow hypertable constraint creation USING INDEX #7040

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 27, 2024

  1. Allow hypertable constraint creation USING INDEX

    Before this commit, the following operation was disallowed:
    
    ```sql
    ALTER TABLE foo ADD CONSTRAINT foo_pkey
    PRIMARY KEY USING INDEX foo_pkey
    ```
    
    pgcopydb, the tool that powers our migration process[1], handles primary key
    and unique constraint migrations in two steps:
    
    1. Build unique indexes.
    2. Create the unique constraint or primary key using the unique index created
       in step 1.
    
    This multi-step approach is useful for reducing the time spent on
    EXCLUSIVE LOCKS while building unique constraints or primary keys.
    
    [1] https://docs.timescale.com/migrate/latest/live-migration/
    
    Signed-off-by: Arunprasad Rajkumar <[email protected]>
    arajkumar committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    1546932 View commit details
    Browse the repository at this point in the history