You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a migration includes partition maintenance commands, such as
ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
FOR VALUES FROM ('2008-02-01') TO ('2008-03-01' );
ALTER TABLE measurement DETACH PARTITION measurement_y2006m02;
running Squawk results in the following error
note: Squawk schema failed to parse Postgres response. This indicates a bug with Squawk. Please report this error to https://github.com/sbdchd/squawk. Schema error: unknown variant `PartitionCmd`, expected one of `TypeCast`, `FuncCall`, `Constraint`, `ColumnDef`, `A_Const`, `ReplicaIdentityStmt`, `SQLValueFunction` at line 1 column 252
help: Modify your Postgres statement to use valid syntax.
Besides fixing this, I suppose we would ideally want new rules for Squawk that would warn users about ACCESS EXCLUSIVE locks on the parent table and suggest
Use DETACH PARTITION ... CONCURRENTLY
Add a CHECK constraint before ATTACH PARTITION commands
Both of the above would drop the lock requirement to SHARE UPDATE EXCLUSIVE, which is an improvement. Thoughts?
The text was updated successfully, but these errors were encountered:
When a migration includes partition maintenance commands, such as
running Squawk results in the following error
Besides fixing this, I suppose we would ideally want new rules for Squawk that would warn users about
ACCESS EXCLUSIVE
locks on the parent table and suggestDETACH PARTITION ... CONCURRENTLY
CHECK
constraint beforeATTACH PARTITION
commandsBoth of the above would drop the lock requirement to
SHARE UPDATE EXCLUSIVE
, which is an improvement. Thoughts?The text was updated successfully, but these errors were encountered: