Go to file
Groovie | Mango bab25959f6
postgres schema fixes after moving to self-operated PostgreSQL (#57)
* remove indices from migration.sql which here never created

* BREAKING: make transaction_id the primary key in transactions lookup table

* use varchar in postgres.rs

* add "NOT NULL" constraint wherever possible

* fix small accounts lookup table naming

* fly app for migration

see https://github.com/blockworks-foundation/BankingStageErrorsTrackingSidecar/issues/56

* autovacuum settings

* databse init script

* explain query_user role

* tune toast_tuple_target and comment on page size

* minor fixes

* dba queries

* jot down the fly machine config

* restore create schema

* tweak storage param for postgres 15
2024-02-24 18:29:52 +01:00
.github/workflows Add fly deployment action 2023-11-28 03:06:39 +00:00
.idea
src postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
.dockerignore
.gitignore
Cargo.lock Alt processing 2024 01 26 (#50) 2024-01-29 10:54:11 +01:00
Cargo.toml Alt processing 2024 01 26 (#50) 2024-01-29 10:54:11 +01:00
DBA.md postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
Dockerfile issue #58: fix INSERT INTO deadlock by ordering data (#59) 2024-02-12 17:10:40 +01:00
README.md postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
alts.txt Preloading ALTs from a predetermined list 2023-12-26 14:40:33 +01:00
fly-hetzner-migration.toml postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
fly.toml postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
init-database.sql postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
migration.sql postgres schema fixes after moving to self-operated PostgreSQL (#57) 2024-02-24 18:29:52 +01:00
run-service-and-cleanup.sh run cleanupjob on fly (#35) 2024-01-05 11:12:44 +01:00

README.md

BankingStage Sidecar

This is a sidecar application for the BankingStage project. It is responsible for importing data from the Solana blockchain into the PostgreSQL database. Data is retrieved via Solana RPC and Geysers gRPC API.

Database Configuration

Database Roles

  • bankingstage_sidecar - write access to the database for the sidecar importer
  • bankingstage_dashboard - read-only access to the database for the dashboard web application
  • query_user - group for read-only access to the database intended for human user interaction with database
CREATE USER some_user_in_group_query_user PASSWORD 'test';
GRANT query_user TO some_user_in_group_query_user;

Configure sidecar PostgreSQL connection

export PG_CONFIG="host=localhost dbname=the_banking_stage_db user=some_user_in_group_query_user password=test sslmode=disable"

Database Schema

The database schema is defined in the migration.sql file. For new database installations start with the init-database.sql file. Required is a PostgreSQL database (tested version 15).