Open mingc opened 9 years ago
I'm not sure how you are using apartment + octopus, they don't do the same thing?
Apartment make it possible the app use multiple schemas on same database Octopus make it possible the app use multiple databases. They are different things, right?
Apartment + Octopus would be useful.
I happened to run into this now. We use Apartment to segregate tenants into different schemas (this is postgresql parlance) of the database for data segregation and are looking into Octopus to decouple reads and writes to send them to different databases.
Hi,
We're using the apartment gem https://github.com/influitive/apartment to implement multi-tenant database. When I test a the read slave, I found octopus' replicated_model doesn't read from the tenant postgres schema (only public schema).
Apartment::Tenant.switch('tenant1') Dummy.create(name: 'test1') Dummy.all -> return empty Dummy.using(:master).all -> return correct data
Is there way to get octopus to read from slave db's tenant schema? Thanks.