Share the same database
-
I am installing n8n on Cloudron and using N8N with a Postgres database. Can I use the same N8N database for different processes? Will there be any system failures or errors if I share it like this in the future? Should I separate it into a different database or can I share it to save resources? Thank you.
-
@zonzonzon the database is not accessible from outside the server. And most apps can't access them either (unless you configure an app to access the database of another explicitly).
But to take a step back, maybe you should tell us what your use case is? A single postgres instance can have multiple databases. On Cloudron, there is a single postgres instance. Apps that need postgres database share this instance already.
-
@girish I intend to share the database of N8N to save resources and avoid the need for any extra installations. Will this affect the operation of N8N in the future every time I retrieve information from the database? Or do I need to create a new database? How can I create a Postgres database in Cloudron?
Currently, I am trying to connect and create a shared table using the N8N database operating within Cloudron. However, I’m worried that in practice, frequent access to the database will cause errors for N8N or performance issues. How can I optimize this usage without causing errors? Thank you.
-
@zonzonzon Cloudron is designed for selfhosting - installing and deploying apps. Usually, people don't even care about what database an app uses, they just want to use an app.
When installing an app, Cloudron preconfigure database, email and other things. All apps that needs a postgres database on Cloudron share the same postgres instance.
There is no way to create a postgres database as such. When you install an app, the platform creates the database and configures the app automatically. This is part of the app lifecycle - install/backup/restore/uninstall. It's all tied together and not independent.
I guess I still don't completely get what your use case is. Are you trying to share the database with another app or within n8n itself (not sure what it means to share a database within an app. What is a shared table?) ?
-
@girish In my use case, can I share the database with N8N installed through cloudron? That is, creating additional tables within the existing N8N database. Does it impact performance or cause errors for N8N? Or if I want to create a new postgres database for use, how should I do it? Thank you.
-
@zonzonzon said in Share the same database:
@girish In my use case, can I share the database with N8N installed through cloudron? That is, creating additional tables within the existing N8N database.
Yes, this is not a problem. You can create whatever tables you want and access it via n8n etc.
Or if I want to create a new postgres database for use, how should I do it? Thank you.
Currenly, you cannot create a database. The databases are precreated/destroyed by the platform.
-
-