set up pg_logical-based master/slave replication for the postgres db
We are currently using a single Postgres DB for all our operations, which is suboptimal because it has to be optimized for many different use cases. To fix that we want to setup two DBs, in master/slave replication:
- master optimized "for writes" (i.e., for adding new content to the DB, which is our main write task)
- slave optimized "for reads" (i.e., queries from both the Web UI and other data crunching tasks) Reality will be more blurry than this, because writes do require to perform some reads (e.g., to check which objects are already in the archive), but the above should be the gist of it.
Migrated from T615 (view on Phabricator)