3

Pocketbase is cunrretly my BaaS solution and due to its flexability I can change/modify the code using Go. I was wondering if I can change the defualt SQLite database and change to something like a MongoDB/Redis database.

I have dug through the files and found nothing but yes/no answers and not a explaination.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Blu
  • 33
  • 5
  • 1
    sqlite "speaks" a dialect of SQL to provide relational data storage. Redis and Mongo are very different. So while it's probably possible to use Mongo / Redis instead, it would be a big ask to switch to not just a different SQL engine but a totally different database style. – erik258 May 09 '23 at 00:35

1 Answers1

2

Sorry mate not at this moment it seems.

Pocketbase states this at the of the FAQ page:

6. Can I use database X?

PocketBase uses embedded SQLite (in WAL mode) and there are no plans for supporting other databases.

Additionally, in this issue:

Currently only SQLite is supported. Support for other SQL databases may be added in the future but for now it is a very low priority.

As for to why, here is the reason:

The main reason for now to even consider adding support for other SQL databases is to support cloud providers with ephemeral storage, not because of scaling (there are other things beside the database that prevents PocketBase to scale horizontally and this is by design).

There are no plans for Redis, since to maximize the performance, we rely heavily on the SQL syntax (even the API rules are converted to SQL statements).

Futher discussions here and here.

Evandro Pomatti
  • 13,341
  • 16
  • 97
  • 165