Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

pg:wait will fail even if the requested operation is still continuing #93

Open
BenLiyanage opened this issue Feb 23, 2017 · 1 comment

Comments

@BenLiyanage
Copy link

I believe pg:wait should retry several times before doing a hard exit here:

https://github.com/heroku/heroku-pg/blob/master/commands/wait.js#L42

I've recently had an issue where pg:wait failed while my restore continued due to an intermittent network connection (https://help.heroku.com/tickets/453842). This is problematic when you are trying to script restores.

Can this have some sort of retry logic in it so that it only hard crashes after failing multiple times?

@msakrejda
Copy link
Contributor

That sounds reasonable; until then, because pg:wait will exit with a zero status if there's nothing to wait for, you can work around this with something like until heroku pg:wait; do :; done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants