[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [db] cleanup gc
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [db] cleanup gc |
Date: |
Mon, 08 Jan 2024 11:58:17 +0100 |
This is an automated email from the git hooks/post-receive script.
johannes-casaburi pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new e49d953 [db] cleanup gc
e49d953 is described below
commit e49d953f46e40c30f8c9cb585681e86e72ac18f2
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Mon Jan 8 11:57:49 2024 +0100
[db] cleanup gc
---
src/donaudb/donau_do_gc.sql | 107 --------------------------------------------
1 file changed, 107 deletions(-)
diff --git a/src/donaudb/donau_do_gc.sql b/src/donaudb/donau_do_gc.sql
index 40badcd..4f90fa0 100644
--- a/src/donaudb/donau_do_gc.sql
+++ b/src/donaudb/donau_do_gc.sql
@@ -28,111 +28,4 @@ DECLARE
denom_min INT8; -- minimum denomination still alive
BEGIN
-DELETE FROM donau.prewire
- WHERE finished=TRUE;
-
-DELETE FROM donau.wire_fee
- WHERE end_date < in_ancient_date;
-
--- TODO: use closing fee as threshold?
-DELETE FROM donau.reserves
- WHERE gc_date < in_now
- AND current_balance = (0, 0);
-
-SELECT
- reserve_out_serial_id
- INTO
- reserve_out_min
- FROM donau.reserves_out
- ORDER BY reserve_out_serial_id ASC
- LIMIT 1;
-
-DELETE FROM donau.recoup
- WHERE reserve_out_serial_id < reserve_out_min;
--- FIXME: recoup_refresh lacks GC!
-
-SELECT
- reserve_uuid
- INTO
- reserve_uuid_min
- FROM donau.reserves
- ORDER BY reserve_uuid ASC
- LIMIT 1;
-
-DELETE FROM donau.reserves_out
- WHERE reserve_uuid < reserve_uuid_min;
-
--- FIXME: this query will be horribly slow;
--- need to find another way to formulate it...
-DELETE FROM donau.denominations
- WHERE expire_legal < in_now
- AND denominations_serial NOT IN
- (SELECT DISTINCT denominations_serial
- FROM donau.reserves_out)
- AND denominations_serial NOT IN
- (SELECT DISTINCT denominations_serial
- FROM donau.known_coins
- WHERE coin_pub IN
- (SELECT DISTINCT coin_pub
- FROM donau.recoup))
- AND denominations_serial NOT IN
- (SELECT DISTINCT denominations_serial
- FROM donau.known_coins
- WHERE coin_pub IN
- (SELECT DISTINCT coin_pub
- FROM donau.recoup_refresh));
-
-SELECT
- melt_serial_id
- INTO
- melt_min
- FROM donau.refresh_commitments
- ORDER BY melt_serial_id ASC
- LIMIT 1;
-
-DELETE FROM donau.refresh_revealed_coins
- WHERE melt_serial_id < melt_min;
-
-DELETE FROM donau.refresh_transfer_keys
- WHERE melt_serial_id < melt_min;
-
-SELECT
- known_coin_id
- INTO
- coin_min
- FROM donau.known_coins
- ORDER BY known_coin_id ASC
- LIMIT 1;
-
-DELETE FROM donau.batch_deposits
- WHERE wire_deadline < in_ancient_date;
-
-SELECT
- batch_deposit_serial_id
- INTO
- batch_deposit_min
- FROM donau.coin_deposits
- ORDER BY batch_deposit_serial_id ASC
- LIMIT 1;
-
-DELETE FROM donau.refunds
- WHERE batch_deposit_serial_id < batch_deposit_min;
-DELETE FROM donau.aggregation_tracking
- WHERE batch_deposit_serial_id < batch_deposit_min;
-DELETE FROM donau.coin_deposits
- WHERE batch_deposit_serial_id < batch_deposit_min;
-
-
-
-SELECT
- denominations_serial
- INTO
- denom_min
- FROM donau.denominations
- ORDER BY denominations_serial ASC
- LIMIT 1;
-
-DELETE FROM donau.cs_nonce_locks
- WHERE max_denomination_serial <= denom_min;
-
END $$;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: [db] cleanup gc,
gnunet <=