Skip to content

Commit ad51b2a

Browse files
committed
store: Drop the vid sequence with 'cascade'
Since it is used for the default value, we get an error sequence sgdNNN.<table>_vid_seq membership in replication set default depends on sequence sgdNNN.<table>_vid_seq That makes all pruning by rebuilding tables fail
1 parent eaf6f0d commit ad51b2a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

store/postgres/src/relational/prune.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ impl TablePair {
235235
)?;
236236
}
237237

238+
writeln!(query, "drop sequence {src_nsp}.{vid_seq} cascade;")?;
238239
writeln!(query, "drop table {src_qname};")?;
239240
writeln!(query, "alter table {dst_qname} set schema {src_nsp}")?;
240241
conn.transaction(|conn| conn.batch_execute(&query))?;

0 commit comments

Comments
 (0)