gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 39/189: test do not partition wire_targets


From: gnunet
Subject: [taler-grid5k] 39/189: test do not partition wire_targets
Date: Thu, 28 Apr 2022 10:46:49 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 4943512dfb8969e5a2fc48eadc2db6bfa61992a4
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sun Feb 27 18:09:27 2022 +0100

    test do not partition wire_targets
---
 experiment/scripts/database.sh | 2 +-
 sql/exchange-0001.sql          | 9 ++++-----
 sql/exchange-0002.sql          | 6 +++---
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 023b38f..22e976e 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -70,7 +70,7 @@ function setup_config() {
   syslog_ident='taler-database'
   log_min_duration_statement=300
   shared_preload_libraries='pg_stat_statements,auto_explain'
-  auto_explain.log_min_duration='300ms'
+  auto_explain.log_min_duration='0'
   auto_explain.log_nested_statements=off
   auto_explain.log_analyze=true
   auto_explain.log_buffers=true
diff --git a/sql/exchange-0001.sql b/sql/exchange-0001.sql
index b65422f..54cc8af 100644
--- a/sql/exchange-0001.sql
+++ b/sql/exchange-0001.sql
@@ -67,13 +67,13 @@ COMMENT ON TABLE denomination_revocations
 
 
 CREATE TABLE IF NOT EXISTS wire_targets
-  (wire_target_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
-  ,h_payto BYTEA CHECK (LENGTH(h_payto)=64)
+  (wire_target_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY -- UNIQUE
+  ,h_payto BYTEA PRIMARY KEY CHECK (LENGTH(h_payto)=64)
   ,payto_uri VARCHAR NOT NULL
   ,kyc_ok BOOLEAN NOT NULL DEFAULT (FALSE)
   ,external_id VARCHAR
   )
-  PARTITION BY HASH (wire_target_serial_id);
+  PARTITION BY HASH (h_payto);
 COMMENT ON TABLE wire_targets
   IS 'All senders and recipients of money via the exchange';
 COMMENT ON COLUMN wire_targets.payto_uri
@@ -91,10 +91,9 @@ CREATE TABLE IF NOT EXISTS wire_targets_default
 -- FIXME partition by serial_id rather than h_payto, 
 -- it is used more in join conditions - crucial for sharding to select this.
 -- Author: (Boss Marco)
-CREATE INDEX IF NOT EXISTS wire_targets_serial_payto_index
+CREATE INDEX IF NOT EXISTS wire_targets_wire_target_serial_id
   ON wire_targets
   (wire_target_serial_id
-   ,h_payto
   );
 
 CREATE TABLE IF NOT EXISTS reserves
diff --git a/sql/exchange-0002.sql b/sql/exchange-0002.sql
index cfc91dc..dd55aab 100644
--- a/sql/exchange-0002.sql
+++ b/sql/exchange-0002.sql
@@ -6,7 +6,7 @@ BEGIN
 
   RAISE NOTICE 'Detaching default table partitions';
 
-  ALTER TABLE IF EXISTS wire_targets DETACH PARTITION wire_targets_default;
+  -- ALTER TABLE IF EXISTS wire_targets DETACH PARTITION wire_targets_default;
   ALTER TABLE IF EXISTS reserves DETACH PARTITION reserves_default;
   ALTER TABLE IF EXISTS reserves_in DETACH PARTITION reserves_in_default;
   ALTER TABLE IF EXISTS reserves_close DETACH PARTITION reserves_close_default;
@@ -33,7 +33,7 @@ BEGIN
 
   RAISE NOTICE 'Dropping default table partitions';
 
-  DROP TABLE IF EXISTS wire_targets_default;
+  -- DROP TABLE IF EXISTS wire_targets_default;
   DROP TABLE IF EXISTS reserves_default;
   DROP TABLE IF EXISTS reserves_in_default;
   DROP TABLE IF EXISTS reserves_close_default;
@@ -92,7 +92,7 @@ BEGIN
   PERFORM detach_default_partitions();
 
   LOOP
-    PERFORM create_partition('wire_targets', modulus, num_partitions);
+    -- PERFORM create_partition('wire_targets', modulus, num_partitions);
     PERFORM create_partition('reserves', modulus, num_partitions);
     PERFORM create_partition('reserves_in', modulus, num_partitions);
     PERFORM create_partition('reserves_close', modulus, num_partitions);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]