-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[YSQL] Dropping a primary key constraint is not supported #8735
Comments
+1 with Boundary:
|
+1 for this capability. I'd like to run Boundary with yugabyte |
Is there a workaround if I want to change the primary key of a table? Haven't been able to find anything in the docs: |
@amitsaxena While this issue isn't implemented, you can do something like CREATE TABLE t2 (...);
INSERT INTO t2 SELECT * FROM t;
DROP TABLE t;
ALTER TABLE t2 RENAME TO t; This assumes you're just playing around and there are no real workloads using |
While this is a great insight, it’s not enough in many cases. This issue is still preventing installing keycloak on ybdb using default migrations. |
@radekg of course, this is merely a workaround. This issue is on our radars though. |
YugaByte DB Liquibase error for Keycloak. |
This has been implemented. |
Jira Link: DB-1677
Attempting dropping a primary key constraint results in an error:
This is explicitly disabled in the code:
yugabyte-db/src/postgres/src/backend/commands/tablecmds.c
Line 10500 in 1a8f161
From what I hear, the reason is that the primary key is tied to the table's storage layout and this is remotely related to
ALTER TABLE adding a primary key
#1104. This seems like a reversal of fd257e7.The text was updated successfully, but these errors were encountered: