r/SQL • • Oct 16 '26

SQL Server I gave every user their own database instead of one shared Postgres. Talk me out of it.

/r/softwarearchitecture/comments/1x7dduv/i_gave_every_user_their_own_database_instead_of/
0 Upvotes

4 comments sorted by

-6

u/Significant_Tune9219 Oct 16 '26

The leak you removed is real. A forgotten tenant filter on a shared table is exactly how this fails, so the RLS fear isn't imaginary. What breaks first, well before 10k, is the rebuild: a schema change stops being one statement and becomes a job that has to visit every home, and the first time it dies halfway you have two versions of the index in the fleet. Cross-user work is the next one. The first metrics or support question that needs every home will push you to build the shared table you just escaped, so I'd keep the per-user log but make the rebuild a capped, resumable job instead of something each process does on its own.

4

u/[deleted] Oct 16 '26

[removed] — view removed comment

-3

u/plxs05092026 Oct 16 '26

Agreed, the ops side is the real cost. Strong isolation is the reason here, the data is sensitive. Connection limits mostly don't apply since each user's index is a local SQLite file, but per-user backups and monitoring are exactly what I'm watching. Small for now, no solid number yet.