Gleb Novikov
3d7a32f619
fast import: allow restore to provided connection string ( #10407 )
...
Within https://github.com/neondatabase/cloud/issues/22089 we decided
that would be nice to start with import that runs dump-restore into a
running compute (more on this
[here](https://www.notion.so/neondatabase/2024-Jan-13-Migration-Assistant-Next-Steps-Proposal-Revised-17af189e004780228bdbcad13eeda93f?pvs=4#17af189e004780de816ccd9c13afd953 ))
We could do it by writing another tool or by extending existing
`fast_import.rs`, we chose the latter.
In this PR, I have added optional `restore_connection_string` as a cli
arg and as a part of the json spec. If specified, the script will not
run postgres and will just perform restore into provided connection
string.
TODO:
- [x] fast_import.rs:
- [x] cli arg in the fast_import.rs
- [x] encoded connstring in json spec
- [x] simplify `fn main` a little, take out too verbose stuff to some
functions
- [ ] ~~allow streaming from dump stdout to restore stdin~~ will do in a
separate PR
- [ ] ~~address
https://github.com/neondatabase/neon/pull/10251#pullrequestreview-2551877845~~
will do in a separate PR
- [x] tests:
- [x] restore with cli arg in the fast_import.rs
- [x] restore with encoded connstring in json spec in s3
- [ ] ~~test with custom dbname~~ will do in a separate PR
- [ ] ~~test with s3 + pageserver + fast import binary~~
https://github.com/neondatabase/neon/pull/10487
- [ ]
~~https://github.com/neondatabase/neon/pull/10271#discussion_r1923715493~~
will do in a separate PR
neondatabase/cloud#22775
---------
Co-authored-by: Eduard Dykman <bird.duskpoet@gmail.com >
2025-02-14 16:10:06 +00:00