19 lines
573 B
Bash
19 lines
573 B
Bash
#!/bin/bash
|
|
# Check the status of the indicators table (constraints and compression)
|
|
|
|
docker exec -i btc_timescale psql -U btc_bot -d btc_data <<EOF
|
|
\x
|
|
SELECT 'Checking constraints...' as step;
|
|
SELECT conname, pg_get_constraintdef(oid)
|
|
FROM pg_constraint
|
|
WHERE conrelid = 'indicators'::regclass;
|
|
|
|
SELECT 'Checking compression settings...' as step;
|
|
SELECT * FROM timescaledb_information.hypertables
|
|
WHERE hypertable_name = 'indicators';
|
|
|
|
SELECT 'Checking compression jobs...' as step;
|
|
SELECT * FROM timescaledb_information.jobs
|
|
WHERE hypertable_name = 'indicators';
|
|
EOF
|