From ee075dfea9d59384cdbfa38f403ac3956d83439d Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Wed, 3 Jul 2024 19:30:47 +0200 Subject: [PATCH] vaccum account_ids+blockhash_ids --- .../postgres/postgres_block_store_writer.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/blockstore/src/block_stores/postgres/postgres_block_store_writer.rs b/blockstore/src/block_stores/postgres/postgres_block_store_writer.rs index d6ebd2f1..b5c646a8 100644 --- a/blockstore/src/block_stores/postgres/postgres_block_store_writer.rs +++ b/blockstore/src/block_stores/postgres/postgres_block_store_writer.rs @@ -366,11 +366,23 @@ impl PostgresBlockStore { ); let statement2 = format!( r#" - VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.transaction_blockdata + VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.account_ids "#, schema = PostgresEpoch::build_schema_name(epoch), ); let statement3 = format!( + r#" + VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.blockhash_ids + "#, + schema = PostgresEpoch::build_schema_name(epoch), + ); + let statement4 = format!( + r#" + VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.transaction_blockdata + "#, + schema = PostgresEpoch::build_schema_name(epoch), + ); + let statement5 = format!( r#" VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.blocks "#, @@ -383,6 +395,8 @@ impl PostgresBlockStore { write_session.execute_multiple(&statement1), write_session.execute_multiple(&statement2), write_session.execute_multiple(&statement3), + write_session.execute_multiple(&statement4), + write_session.execute_multiple(&statement5), ); let elapsed = started.elapsed();