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

Support for PostgreSQL #2

Open
csaf4370 opened this issue Dec 11, 2019 · 10 comments
Open

Support for PostgreSQL #2

csaf4370 opened this issue Dec 11, 2019 · 10 comments

Comments

@csaf4370
Copy link

Hi!

I really like this project and the idea of it! Great work.
My goto db is PostgreSQL, are there any plans to support it?

@infostreams
Copy link
Owner

Well the plans are there but the time is not (as in: I don't have any time). I also don't have a direct need myself, which probably means that we will need to rely on outside contributions to add support for other databases.

However, implementing a basic version of it should be possible without too much effort, because I wrote the software with extensibility in mind.

Basically the actual database operations are contained in two different sets of tiny files, and during setup ("db init") you already have to choose the database type so that the software knows where to find these files.

I would love to see PostgreSQL support. You could get started by copying the mysql folder in the bin/drivers into a new postgresql folder, and then changing the four scripts ('load', 'save', ...) in the postgresql\connectors\direct folder until they can make a backup, restore a backup, test the database connection, and run a direct SQL query. I think that's the meat of what needs to happen to add PostgreSQL support.

@csaf4370
Copy link
Author

Thanks for the detailed reply,

I started with the postgresql support, but I'm not done yet. Hopefully the next few weeks, will allow me to finish it.

Cheers

@infostreams
Copy link
Owner

Awesome!

@harrybiddle
Copy link

Hey @csaf4370! I'm interested in this too. How much work is involved? Can I be of help?

@infostreams
Copy link
Owner

@csaf4370 Any chance you can share what you have so far? However buggy or incomplete?

@csaf4370
Copy link
Author

csaf4370 commented Jan 10, 2020

sorry for the late reply, I already got a few things working.
When I'm at home I'll publish my fork and the current status.

edit: here we go:

my fork lives in https://github.com/csaf4370/db.git
branch: postgresql

make sure that the current repository is already postgresql or a new one.
Currently you can not mix mysql and postgresql in the same repository.

currently working:

  • db init with postgresql and direct connector
  • connection test for the init part
  • db save
  • db export

whats certainly currently missing:

  • db load
  • db import
  • db server add (somehow works, but not fully)

All the best.

@csaf4370
Copy link
Author

see above comment... not sure if you get a notification for the edit.

@infostreams
Copy link
Owner

Sorry, I've been sick all week. I'll have a look at this early next week - thanks for sharing!

@paulgeisler
Copy link

You guys are awesome! I'm really looking forward to it. :)

@paulgeisler
Copy link

Maybe this repo could help somehow:
https://github.com/postgrespro/pg_probackup

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