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

Cannot create a Replibyte dump from a PostgreSQL .dump or .sql file with --source_type postgresql --input --file #209

Open
davidbruce opened this issue Jul 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@davidbruce
Copy link

I have attempted to work around #208 by creating a manual dump file and then processing it with Replibyte. This unfortunately does not work and it just spins forever.

replibyte -c manual-local-config.yaml dump create --source_type postgresql --input --file manual-dumps/local_manual.dump

I stepped through the Replibyte code and found following code in dump.rs: 170

// some user use "postgres" and "postgresql" both are valid
Some(v) if v == "postgres" || v == "postgresql" => {
if args.file.is_some() {
let dump_file = File::open(args.file.as_ref().unwrap())?;
let mut stdin = stdin(); // FIXME
let reader = BufReader::new(dump_file);
let _ = stdin.read_to_end(&mut reader.buffer().to_vec())?;
}
let postgres = PostgresStdin::default();
let task = FullDumpTask::new(postgres, datastore, options);
task.run(progress_callback)?

Line 176 hangs forever when passing a .dump file or a .sql file. I assume this has something to do with the //FIXME 😅

@evoxmusic evoxmusic added the bug Something isn't working label Aug 6, 2022
@evoxmusic
Copy link
Contributor

Hi @davidbruce, thanks for reporting your issue and digging into it. Do you know the SQL line that makes your dump reading fail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants