Skip to content

Commit 7d2aaa8

Browse files
author
Zoran Cvetkov
committed
try to fix graft prune test
1 parent eadc49c commit 7d2aaa8

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

store/postgres/src/relational/prune.rs

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ use graph::{
1717
};
1818
use itertools::Itertools;
1919

20-
use crate::{
21-
catalog,
22-
copy::AdaptiveBatchSize,
23-
deployment,
24-
relational::{Table, VID_COLUMN},
25-
};
20+
use crate::{catalog, copy::AdaptiveBatchSize, deployment, relational::Table};
2621

2722
use super::{Catalog, Layout, Namespace};
2823

@@ -73,7 +68,6 @@ struct TablePair {
7368
// has the same name as `src` but is in a different namespace
7469
dst: Arc<Table>,
7570
src_nsp: Namespace,
76-
dst_nsp: Namespace,
7771
}
7872

7973
impl TablePair {
@@ -100,12 +94,7 @@ impl TablePair {
10094
}
10195
conn.batch_execute(&query)?;
10296

103-
Ok(TablePair {
104-
src,
105-
dst,
106-
src_nsp,
107-
dst_nsp,
108-
})
97+
Ok(TablePair { src, dst, src_nsp })
10998
}
11099

111100
/// Copy all entity versions visible between `earliest_block` and
@@ -239,10 +228,6 @@ impl TablePair {
239228
let src_qname = &self.src.qualified_name;
240229
let dst_qname = &self.dst.qualified_name;
241230
let src_nsp = &self.src_nsp;
242-
let dst_nsp = &self.dst_nsp;
243-
244-
let vid_seq = format!("{}_{VID_COLUMN}_seq", self.src.name);
245-
246231
let mut query = String::new();
247232

248233
// What we are about to do would get blocked by autovacuum on our
@@ -252,12 +237,13 @@ impl TablePair {
252237
"src" => src_nsp.as_str(), "error" => e.to_string());
253238
}
254239

240+
// TODO: check if this is needed
255241
// Make sure the vid sequence
256242
// continues from where it was
257-
writeln!(
258-
query,
259-
"select setval('{dst_nsp}.{vid_seq}', nextval('{src_nsp}.{vid_seq}'));"
260-
)?;
243+
// writeln!(
244+
// query,
245+
// "select setval('{dst_nsp}.{vid_seq}', nextval('{src_nsp}.{vid_seq}'));"
246+
// )?;
261247

262248
writeln!(query, "drop table {src_qname};")?;
263249
writeln!(query, "alter table {dst_qname} set schema {src_nsp}")?;

0 commit comments

Comments
 (0)