LightRAG icon indicating copy to clipboard operation
LightRAG copied to clipboard

Namespace prefix on postgresql impl

Open puppetm4st3r opened this issue 10 months ago • 6 comments

The parameter namespace prefix did not affect the table creation process (DDL), only apply to the graph name in the PG internal AGE schema, it would be useful to apply to the entire table name crearion process in order to support multi KB instances on a single "tenant"

puppetm4st3r avatar Feb 17 '25 14:02 puppetm4st3r

Hi, Thanks for sharing.

Could you provide me with some of what you need?

I'll try to take a look.

YanSte avatar Feb 17 '25 20:02 YanSte

thanks, In certain production scenarios it would be super useful to have the possibility of mounting several knowledge graphs in the same pg database, in the implementation of postgres the names of the tables are created in a hard code way and do not take the namespace_suffix parameter which I assume is precisely to be able to create different instances of lightrag to different knowledge graphs in the same database server

puppetm4st3r avatar Feb 18 '25 16:02 puppetm4st3r

I ran into the same issue. Have you looked into the 'workspace' variable of the postgres implementation? I believe it works the same way namespace prefixes work in other implementations.

JoramMillenaar avatar Mar 10 '25 21:03 JoramMillenaar

didnt work for me

puppetm4st3r avatar Mar 10 '25 22:03 puppetm4st3r

same issue

ZhuLinsen avatar Mar 12 '25 09:03 ZhuLinsen

My use case:

I have many tenants in my app. I want to be able to segment knowledge graphs, vector stores, etc. by an identifier, such that when I query with that specific identifier, say a tenant id, only nodes from that tenant's knowledge graph are returned.

From my research, no GraphRag solution implements anything like this: every one requires spinning up an entirely separate instance of the app and separate database or at least per-tenant name spaced set of tables.

That is deeply suboptimal for a whole bunch of reasons.

Thank you!

cromulus avatar Mar 21 '25 15:03 cromulus

same here

My use case:

I have many tenants in my app. I want to be able to segment knowledge graphs, vector stores, etc. by an identifier, such that when I query with that specific identifier, say a tenant id, only nodes from that tenant's knowledge graph are returned.

From my research, no GraphRag solution implements anything like this: every one requires spinning up an entirely separate instance of the app and separate database or at least per-tenant name spaced set of tables.

That is deeply suboptimal for a whole bunch of reasons.

Thank you!

pavei avatar Apr 24 '25 20:04 pavei

Fixed in latest version. Pls use WORKSPACE instead of namespace .

danielaskdd avatar Jul 19 '25 17:07 danielaskdd