Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make server database agnostic #1107

Closed
david-perez opened this issue Jul 16, 2023 · 6 comments
Closed

Make server database agnostic #1107

david-perez opened this issue Jul 16, 2023 · 6 comments

Comments

@david-perez
Copy link

Currently, the atuin server requires a dependency on Postgres. While the default sync server probably has enough load that a full-fledged database server like Postgres is probably the right call, for us users who self-host it's overkill to spin up a separate Docker container for it.

It'd be nice if the atuin server were decoupled from Postgres and instead worked with other database drivers, like sqlite.

@conradludgate
Copy link
Collaborator

We've actually already done this, the change just isn't released yet. See https://github.com/conradludgate/atuin-server-sqlite for an example

@ellie
Copy link
Member

ellie commented Jul 16, 2023

Just a heads up too - currently Postgres is the only officially maintained and tested implementation

Feel free to use others like @conradludgate shared, but they won't be as well supported

@david-perez
Copy link
Author

Ah, nice! I'll give it a try.

the change just isn't released yet

Does this imply that it will eventually be merged in ellie/atuin? If not, I think prominently linking to conradludgate/atuin-server-sqlite from the official self-hosting docs would suffice to make this discoverable.

@ellie
Copy link
Member

ellie commented Jul 16, 2023

It will not be merged in, as we do not officially support it and do not intend on doing so. It would double our testing/maintenance, which is not something I'd like to do

I'd like to avoid guiding people that way for the same reasons, at least for now

@Skaronator
Copy link

What about MySQL/MariaDB? I use MariaDB exclusively because it is much simpler to selfhost and maintain.

I was looking into switching everything to Postgres today and just noticed how painful the upgrade process is even when you only use container images. It is always required to pg_dumpall and import all data in the new running container. This sounds easier than it actually is. Especially since I use Kubernetes and ArgoCD Deployments without a Postgres Operator.

If you mount to a previous volume used by the older Postgres server, the new Postgres server will fail. Postgres requires the data to be migrated before it can load it.

https://www.cloudytuts.com/tutorials/docker/how-to-upgrade-postgresql-in-docker-and-kubernetes/

@conradludgate
Copy link
Collaborator

You're welcome to add your own mysql/maria support using the above linked sqlite project as a template, but I'm not willing to implement support for every database myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants