Home › Curriculum › Technical Foundations › PostgreSQL administration for Odoo
PostgreSQL and SQL for Odoo · 14 min · PostgreSQL 16PostgreSQL administration for Odoo
psql, roles, databases, dump and restore, connections, vacuum and the settings that matter for Odoo.
In this lesson
- psql and roles
- Dump, restore and the filestore
- Health, connections and versions
Key points
- psql: \l, \dt, \d, \x, \q; Odoo role owns DBs, not superuser
- pg_dump -Fc / pg_restore; Odoo backup = DB + filestore
- max_connections > workers × db_maxconn + overhead
- Odoo 20: PostgreSQL 16+, pgvector for AI; pg_upgrade path
Real-world example
A server ran out of disk every Friday. Investigation showed a nightly pg_dump of a 40 GB database kept forever, plus a bloated mail_message table. Rotating backups to 14 days off-server and tuning autovacuum on the big tables freed 300 GB.
Questions and answers
Which psql command describes a table?
\d tablename
Where is the filestore by default?
data_dir/filestore/<dbname> (for example ~/.local/share/Odoo/filestore/<db>).