-
Notifications
You must be signed in to change notification settings - Fork 476
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
fast import: restore to neondb (not postgres) database #10251
Conversation
7315 tests run: 6939 passed, 0 failed, 376 skipped (full report)Flaky tests (1)Postgres 17
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
ebc4735 at 2025-01-15T20:28:25.536Z :recycle: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the feedback I gave on Slack, I think instead of building a complicated CLI, let's allow specifying the spec as a filesystem path in addition to an S3 location.
It'd be a good Rust learning exercise to do that refactoring, but, probably better to wait for someone from Storage to pick this up / pair with you.
The fast_import.rs
code isn't up to our usual standards, remember, it's PoC code.
Though about it as well, but not sure I like the idea of putting some testing args into the spec. Optional args have the same semantics as top-level json spec values, so I would leave them as is for now (until I really need any of those in the spec) |
73c14a7
to
ebe26e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do we want to always restore to 'neondb'? I'd expect the restore to preserve the original database name, i.e. if the source database is called "myapp_staging", I'd expect it to be imported as "myapp_staging" too.
137c377
to
ebc4735
Compare
We did not have any tests on fast_import binary yet. In this PR I have introduced: - `FastImport` class and tools for testing in python - basic test that runs fast import against vanilla postgres and checks that data is there Should be merged after #10251
Problem
postgres
is system database at neon, so we need to dopg_restore
intoneondb
insteadhttps://github.com/neondatabase/cloud/issues/22100
Summary of changes
Changed fast_import a little bit:
neondb
in postgres instancesource_connection_string
, which allows to skips3_prefix
and just connect directly.-i
that stops process until sigtermTODO