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

Postgres sync #64

Open
abalmos opened this issue Aug 31, 2020 · 3 comments
Open

Postgres sync #64

abalmos opened this issue Aug 31, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@abalmos
Copy link
Member

abalmos commented Aug 31, 2020

Postgres/timescaledb is becoming our primary storage layer for data logs. We should consider some schemes for getting this data back to a remote postgres for permanent storage.

This is an interesting project that we may be able to use and/or learn from: https://bucardo.org/Bucardo/

@abalmos abalmos added the enhancement New feature or request label Aug 31, 2020
@abalmos abalmos added this to the 0.1.0 Release milestone Aug 31, 2020
@facastiblancor
Copy link
Collaborator

I like the way they handle the database replication. Though, my only concern is the control the sync frequency, which (I think I did not understand on their wiki) seems to depend on several variables of our environment.

@abalmos
Copy link
Member Author

abalmos commented Aug 31, 2020

Yeah and we likely only want ISOBlueN -> cloud sync, not ISOBlue1 <-> ISOBlue2 <-> ... <-> cloud sync

@abalmos
Copy link
Member Author

abalmos commented Aug 31, 2020

I'm thinking a "first" cut at this could be something like every hour:

  1. get a "last" timestamp for each table from the server
  2. export data from the ISOBlue from those timestamps forward (SQL dump ?)
  3. compress all exports into one thing
  4. send to server
  5. decompress
  6. INSERT dumps into the same table schema with one additional column of node or something like that per row.

might be the easiest thing moving forward.

That would hopefully play nice with timescaledb's partitions?

@aaron97neu aaron97neu self-assigned this Sep 14, 2020
@aaron97neu aaron97neu removed this from the 0.1.0 Release milestone Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants