pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

Support for multi-tenant db that leverages the PostgreSQL Schema feature?

Open namoshizun opened this issue 4 years ago • 2 comments

Hii, Thanks for creating this super useful tool :D! I am building a multi-tenanted SaaS application using Django. To achieve data isolation, each registered user's data is stored under his/her own PG Schema. Now I would like to synchronize the SaaS database with Elasticsearch to provide advanced & efficient search capacity.

Pgsync is thus far the most promising and easy-to-get-started tool I can find to implement the data synchronization. However, it looks like PGsync only supports statically typed schema in the Schema JSON? i.e., it won't automatically looks for all schemas start with "foo" if I give foo* as schema?

namoshizun avatar Jul 26 '21 10:07 namoshizun

Postgres schemas are statically defined and this was deliberate. I can add this to the TODO.

toluaina avatar Jul 29 '21 20:07 toluaina

Thanks @toluaina. I reckon this would be a fantastic feature, especially for multI-tenanted SaaS applications relying on the database schema to achieve data isolation, which is a common practice :D Much look forward to it!

namoshizun avatar Aug 16 '21 06:08 namoshizun