What multi-tenant data isolation means for your business data
Multi-tenant isolation keeps one customer's rows invisible to every other customer. Mahavio enforces that isolation with Postgres row-level security.
Last reviewed 5 min readNKB, Inc.
Multi-tenant data isolation is the guarantee that one customer's records stay invisible to every other customer of the same software, even though all of them share one application. Every SaaS tool a seller uses makes that promise. The interesting question is where the promise is enforced.
For an Amazon wholesale seller the stakes are concrete. A supplier list, the cost column on a price list, and which brands have approved an account are the competitive position of the business. What matters is whether the isolation is a database rule or a line of code somebody has to remember to write.
What row-level security actually does
Row-level security is a rule stored in the database that decides which rows a given connection is allowed to see, applied by the database on every query. Mahavio runs on PostgreSQL 16 with row-level security, and each tenant is one company. When the application asks for products, the database itself narrows the result to the current tenant's rows before the application ever receives them.
The load-bearing detail is which database role the application connects as. Postgres row-level security is bypassed by a superuser and by any role granted the bypass privilege, so an application connecting as a superuser has policies that do nothing. Mahavio connects as a role that row-level security actually applies to, not a superuser. That single choice is the difference between a policy that enforces isolation and a policy that is decorative.
Why enforcing isolation in the database beats enforcing it in application code
Database-enforced isolation beats application-code isolation because it fails safe when a developer forgets, and application code fails open. In the application-code model, every query carries a condition restricting it to the current customer. Hundreds of queries, written over years by different people, each correct only if its author remembered. One endpoint missing that condition returns everybody's data.
The reason a missing tenant filter survives testing has a shape worth naming: the empty test database problem. Development and staging environments almost always contain one tenant's data, so a query that forgot its filter returns exactly the right rows there, passes every test, and ships. The defect only becomes visible once a second customer exists, at which point it is a live data leak rather than a failing test.
Where isolation can be enforced, and what each layer costs
There are four common places to enforce tenant isolation, and they trade operational cost against blast radius. The strongest is not automatically the right choice for a small vendor.
| Approach | How it works | What it catches | What it costs |
|---|---|---|---|
| One database per customer | A physically separate database per customer | A query cannot reach another customer's data at all | Every migration runs once per customer |
| One schema per customer | Shared server, a separate namespace per customer | Most cross-customer reads, if the search path is set | Pooling and migration complexity grow with customer count |
| Row-level security | The database attaches a tenant policy to each table and applies it to every query | A query that forgot its tenant filter | Policies must cover every table, and the app must connect as a non-bypassing role |
| Application-code filtering | Each query carries a tenant condition the developer wrote by hand | Nothing a developer forgets to write | Cheapest to build, and the failure mode is silent |
Mahavio uses row-level security, the third row. A database-per-customer architecture has a harder isolation boundary, and a seller who requires that boundary should say so when evaluating any shared-database SaaS tool, Mahavio included.
What row-level security does not protect against
Row-level security separates customers from each other. It does nothing about threats that come through a legitimate front door, and treating it as general security is the mistake to avoid.
Row-level security does not protect against a stolen password or session token, because a compromised login is a valid tenant. It does not protect against a virtual assistant misusing access already granted, which is a permissions question — Mahavio handles that with two main roles plus a separate investor role and per-tab permissions enforced on the backend, not merely hidden in the interface, described in how to give a VA system access without exposing the business. It also does nothing about a carelessly handled database backup or vendor staff with production access. Mahavio holds no SOC 2 report, no ISO certification and no formal uptime SLA, and is a small product from a small operator.
Credentials, API keys and the shared-quota problem
Isolation of credentials is a separate problem from isolation of rows, and pooled API keys are where many seller tools quietly break it. Mahavio stores each tenant's own integration credentials encrypted at rest with Fernet, and environment-variable credentials apply only to the original seed tenant. Every tenant brings its own Amazon SP-API and Keepa keys.
Per-tenant credentials have an operational consequence beyond privacy. When a vendor pools one Amazon developer credential across all its customers, throttling is shared: another customer's bulk catalog run consumes the quota an urgent lookup needed. Separate keys mean the rate limits described in Amazon SP-API explained for sellers who are not developers belong to one business alone. The cost is setup work, a trade-off examined in why bring-your-own API keys matter in seller software.
Data that leaves the database: the browser copy
Isolation inside the database says nothing about copies of the data outside it, and Mahavio deliberately makes one. Read paths are mirrored to the browser by PowerSync, so list views work offline from a local in-browser copy while all writes still go through the API. That design makes the product fast and usable on a bad connection.
The honest implication is that a working copy of tenant data lives on every machine that signs in — the operator's laptop plus each virtual assistant's. Device security is therefore part of the data-isolation picture: full-disk encryption on staff machines, sign-out on shared computers, and prompt account removal when a contractor finishes.
Frequently asked questions
Does row-level security mean my supplier list cannot leak
Row-level security means another customer of the same software cannot query it. Leaks through a stolen password, a virtual assistant with legitimate access, an exported spreadsheet, or a lost laptop need separate controls.
Is a separate database per customer safer than row-level security
A separate database per customer is a harder boundary, because no query can cross it. Row-level security is far stronger than an application filter but depends on correct policy coverage and a non-bypassing role.
Can Mahavio staff see my data
Mahavio is operated by NKB, Inc. on hosted infrastructure, so the practical answer, as for every hosted SaaS tool, is that someone with production database access technically can. Mahavio publishes no audited control framework covering it.
Does one login work for more than one business
Yes. One Mahavio login can own multiple business identities, each a separate tenant. Data does not merge across tenants; switching identity changes which tenant's rows the database returns.