Uh oh!
There was an error while loading. Please reload this page.
libsql: attach databases from other namespaces as readonly - #770
Conversation
With this proof-of-concept patch, other namespaces hosted on the same sqld machine are now attached in readonly mode, so that users can read from other databases when connected to a particular one.
psarna
commented
Oct 13, 2023
Assumption in this PoC is that all namespaces in a single sqld instance belong to a single user, so they're visible. That assumption is not going to hold long-term, with our multitenancy plans, and then we'd have to only attach databases that a particular user is allowed to see |
MarinPostma
commented
Oct 13, 2023
This is not going to work for multiple reasons:
And I don't think that this is a good idea either:
|
psarna
commented
Oct 13, 2023
All valid points, but we had users asking how to access another database of theirs, so that they can read from it. Maybe we should just consider an API that allows you to dynamically attach another database from a different namespace to either all future connections, or one particular connection (the latter e.g. by overriding the |
Also,
How? And did we specify the isolation guarantees somewhere? In general if we have multiple users using namespaces then we don't want them to know about each other indeed, but shareable namespaces of a single user can be a worthy feature, if doable |
psarna
commented
Oct 13, 2023
And one more - what's an |
MarinPostma
commented
Oct 13, 2023
An active namespace is a namespace that is loaded in memory, and whose life-cycle is managed by the namespace store |
psarna
commented
Oct 13, 2023
Downgrading to draft, since it should have been marked draft in the first place. Also, some preliminary conclusions:
|
With this proof-of-concept patch, other namespaces hosted on the same sqld machine are now attached in readonly mode, so that users can read from other databases when connected to a particular one.
Example:
Database1:
Database2: