Debug postgresql
As with disk iotop, use pg_top for postgresql
Debian install package pgtop
pg_top
As with disk iotop, use pg_top for postgresql
Debian install package pgtop
pg_top
Check whether is restart required for postgresql db after config changeSELECT * FROM pg_settings WHERE pending_restart = true;
repmgr primary register — initialise a repmgr installation and register the primary node
repmgr primary unregister — unregister an inactive primary node
repmgr standby clone — clone a PostgreSQL standby node from another PostgreSQL node
Posgtesql cheat sheet, use with caution, most compatible with mysql
show configurationSHOW ALL
connect to db\c db_name;
create databasecreate database db_name;
list databases\l
How to clean postgresql db without actually dropping it
connect to desired db\c db_name
check db schema\dn
delete tablesDROP SCHEMA public CASCADE;
CREATE SCHEMA public;
Check mysql
SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "DB_name" ORDER BY (data_length + index_length) DESC;