We're working on two different GIS apps and we're a bit torn around how to provide a level of tenant data isolation on our GIS systems.

System A would need to have strong tenant data isolation where 1 single app is used by multiple tenants to access their own separate data. We'd be looking at 50-500 range of clients to support and therefore up to 500 individual databases to connect to.

Our plan so far is to find a way to work with isolated shards or altogether different databases. Do all the capabilities of a standard PostgreSQL apply in this scenario? if anything works with PostgreSQL are we safe to assume it will work with PostGIS?

System B does not need complete tenant data isolation but it does need query-level isolation whilst keeping it possible for a 'tenant' manager to query all data.

This is aimed for a single company which has 50+ projects with separate users that need to query only project-relevant data, whilst at the top level being able to also query the data as a whole. We'd like to optimize for project-level query performance in this scenario.

So there's a project-level isolation when running queries for business/performance and to some degree security purposes.

Has anyone encountered any of these use cases with PostGIS/GIS data? We've yet to make a choice for database but PostGIS seems the obvious choice so far.

  • This is likely a question better asked over at Database Administrators, to get some definitive answers; PostGIS should not be a concern here. However, having multiple (many) databases in the same cluster is somewhat of an anti-pattern in PG; you can manage permissions down to row level, so in theory, you could have a single table for all 500 customers, with one or more columns defining permissions. – geozelot Feb 18 at 13:22
  • Only thing I'm aware of is PostGIS topology where each topology dataset is created as separate PostgreSQL schema. This is bit unusual but not a showstoper I ques... Everything else should be the same. – DavidP Feb 18 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.