Merge pull request #25 from vulcanize/schema_updates

make tables unlogged for batch import
This commit is contained in:
Ian Norden 2021-11-23 11:04:37 -06:00 committed by GitHub
commit 1c1826773b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,25 @@
-- +goose Up
ALTER TABLE public.blocks SET LOGGED;
ALTER TABLE public.nodes SET LOGGED;
ALTER TABLE eth.header_cids SET LOGGED;
ALTER TABLE eth.uncle_cids SET LOGGED;
ALTER TABLE eth.transaction_cids SET LOGGED;
ALTER TABLE eth.receipt_cids SET LOGGED;
ALTER TABLE eth.state_cids SET LOGGED;
ALTER TABLE eth.storage_cids SET LOGGED;
ALTER TABLE eth.state_accounts SET LOGGED;
ALTER TABLE eth.access_list_elements SET LOGGED;
ALTER TABLE eth.log_cids SET LOGGED;
-- +goose Down
ALTER TABLE public.blocks SET UNLOGGED;
ALTER TABLE public.nodes SET UNLOGGED;
ALTER TABLE eth.header_cids SET UNLOGGED;
ALTER TABLE eth.uncle_cids SET UNLOGGED;
ALTER TABLE eth.transaction_cids SET UNLOGGED;
ALTER TABLE eth.receipt_cids SET UNLOGGED;
ALTER TABLE eth.state_cids SET UNLOGGED;
ALTER TABLE eth.storage_cids SET UNLOGGED;
ALTER TABLE eth.state_accounts SET UNLOGGED;
ALTER TABLE eth.access_list_elements SET UNLOGGED;
ALTER TABLE eth.log_cids SET UNLOGGED;

View File

@ -0,0 +1,25 @@
-- +goose Up
ALTER TABLE public.blocks SET UNLOGGED;
ALTER TABLE public.nodes SET UNLOGGED;
ALTER TABLE eth.header_cids SET UNLOGGED;
ALTER TABLE eth.uncle_cids SET UNLOGGED;
ALTER TABLE eth.transaction_cids SET UNLOGGED;
ALTER TABLE eth.receipt_cids SET UNLOGGED;
ALTER TABLE eth.state_cids SET UNLOGGED;
ALTER TABLE eth.storage_cids SET UNLOGGED;
ALTER TABLE eth.state_accounts SET UNLOGGED;
ALTER TABLE eth.access_list_elements SET UNLOGGED;
ALTER TABLE eth.log_cids SET UNLOGGED;
-- +goose Down
ALTER TABLE public.blocks SET LOGGED;
ALTER TABLE public.nodes SET LOGGED;
ALTER TABLE eth.header_cids SET LOGGED;
ALTER TABLE eth.uncle_cids SET LOGGED;
ALTER TABLE eth.transaction_cids SET LOGGED;
ALTER TABLE eth.receipt_cids SET LOGGED;
ALTER TABLE eth.state_cids SET LOGGED;
ALTER TABLE eth.storage_cids SET LOGGED;
ALTER TABLE eth.state_accounts SET LOGGED;
ALTER TABLE eth.access_list_elements SET LOGGED;
ALTER TABLE eth.log_cids SET LOGGED;