Do not make eth.header_cids a hypertable. (#137)

This commit is contained in:
Thomas E Lackey 2023-07-21 13:27:26 -05:00 committed by GitHub
parent 1b922dbff3
commit 8779bb2b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 12 deletions

View File

@ -1,6 +1,5 @@
-- +goose Up -- +goose Up
SELECT create_hypertable('ipld.blocks', 'block_number', migrate_data => true, chunk_time_interval => 32768); SELECT create_hypertable('ipld.blocks', 'block_number', migrate_data => true, chunk_time_interval => 32768);
SELECT create_hypertable('eth.header_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768);
SELECT create_hypertable('eth.uncle_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768); SELECT create_hypertable('eth.uncle_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768);
SELECT create_hypertable('eth.transaction_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768); SELECT create_hypertable('eth.transaction_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768);
SELECT create_hypertable('eth.receipt_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768); SELECT create_hypertable('eth.receipt_cids', 'block_number', migrate_data => true, chunk_time_interval => 32768);
@ -24,7 +23,6 @@ CREATE TABLE eth.state_cids_i (LIKE eth.state_cids INCLUDING ALL);
CREATE TABLE eth.receipt_cids_i (LIKE eth.receipt_cids INCLUDING ALL); CREATE TABLE eth.receipt_cids_i (LIKE eth.receipt_cids INCLUDING ALL);
CREATE TABLE eth.transaction_cids_i (LIKE eth.transaction_cids INCLUDING ALL); CREATE TABLE eth.transaction_cids_i (LIKE eth.transaction_cids INCLUDING ALL);
CREATE TABLE eth.uncle_cids_i (LIKE eth.uncle_cids INCLUDING ALL); CREATE TABLE eth.uncle_cids_i (LIKE eth.uncle_cids INCLUDING ALL);
CREATE TABLE eth.header_cids_i (LIKE eth.header_cids INCLUDING ALL);
CREATE TABLE ipld.blocks_i (LIKE ipld.blocks INCLUDING ALL); CREATE TABLE ipld.blocks_i (LIKE ipld.blocks INCLUDING ALL);
-- migrate data -- migrate data
@ -34,7 +32,6 @@ INSERT INTO eth.state_cids_i (SELECT * FROM eth.state_cids);
INSERT INTO eth.receipt_cids_i (SELECT * FROM eth.receipt_cids); INSERT INTO eth.receipt_cids_i (SELECT * FROM eth.receipt_cids);
INSERT INTO eth.transaction_cids_i (SELECT * FROM eth.transaction_cids); INSERT INTO eth.transaction_cids_i (SELECT * FROM eth.transaction_cids);
INSERT INTO eth.uncle_cids_i (SELECT * FROM eth.uncle_cids); INSERT INTO eth.uncle_cids_i (SELECT * FROM eth.uncle_cids);
INSERT INTO eth.header_cids_i (SELECT * FROM eth.header_cids);
INSERT INTO ipld.blocks_i (SELECT * FROM ipld.blocks); INSERT INTO ipld.blocks_i (SELECT * FROM ipld.blocks);
-- drop hypertables -- drop hypertables
@ -44,7 +41,6 @@ DROP TABLE eth.state_cids;
DROP TABLE eth.receipt_cids; DROP TABLE eth.receipt_cids;
DROP TABLE eth.transaction_cids; DROP TABLE eth.transaction_cids;
DROP TABLE eth.uncle_cids; DROP TABLE eth.uncle_cids;
DROP TABLE eth.header_cids;
DROP TABLE ipld.blocks; DROP TABLE ipld.blocks;
-- rename new tables -- rename new tables
@ -54,5 +50,4 @@ ALTER TABLE eth.state_cids_i RENAME TO state_cids;
ALTER TABLE eth.receipt_cids_i RENAME TO receipt_cids; ALTER TABLE eth.receipt_cids_i RENAME TO receipt_cids;
ALTER TABLE eth.transaction_cids_i RENAME TO transaction_cids; ALTER TABLE eth.transaction_cids_i RENAME TO transaction_cids;
ALTER TABLE eth.uncle_cids_i RENAME TO uncle_cids; ALTER TABLE eth.uncle_cids_i RENAME TO uncle_cids;
ALTER TABLE eth.header_cids_i RENAME TO header_cids;
ALTER TABLE ipld.blocks_i RENAME TO blocks; ALTER TABLE ipld.blocks_i RENAME TO blocks;

View File

@ -856,13 +856,6 @@ CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id);
CREATE INDEX blocks_block_number_idx ON ipld.blocks USING btree (block_number DESC); CREATE INDEX blocks_block_number_idx ON ipld.blocks USING btree (block_number DESC);
--
-- Name: header_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
--
CREATE TRIGGER ts_insert_blocker BEFORE INSERT ON eth.header_cids FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker();
-- --
-- Name: log_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: - -- Name: log_cids ts_insert_blocker; Type: TRIGGER; Schema: eth; Owner: -
-- --