Create index online postgres
Build index without blocking writes; track progress via pg_stat_progress_create_index
CREATE INDEX CONCURRENTLY idx_<name> ON <table>(col); -- monitor: SELECT * FROM pg_stat_progress_create_index;
more postgres
all 29 commands →
Parallel dump and restore
pg_dump -Fc -j 4 -d <name> -f db.dump && pg_restore -j 4 -d <name> db.dump
Benchmark with pgbench
pgbench -c 32 -j 8 -T 60 -P 5 -d <name>; -- init once: pgbench -i -s 100 <name>
Connect to database
psql -h localhost -U myuser -d mydb
List databases
psql -U postgres -c '\l+'
List tables in schema
psql -U myuser -d mydb -c '\dt public.*'