-
Notifications
You must be signed in to change notification settings - Fork 30
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
run backup before setting up replica #661
Conversation
e5031f5
to
e993dae
Compare
@@ -4166,7 +4166,8 @@ CREATE EVENT TRIGGER pgrst_watch | |||
// Wait for Postgres to restart | |||
{ | |||
let started = Utc::now(); | |||
let max_wait_time = chrono::Duration::seconds(TIMEOUT_SECONDS_POD_READY as _); | |||
let max_wait_time = | |||
chrono::TimeDelta::try_seconds(TIMEOUT_SECONDS_POD_READY as _).unwrap(); |
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.
Updating deprecated method https://docs.rs/chrono/latest/chrono/type.Duration.html#method.seconds
@@ -4220,7 +4221,7 @@ CREATE EVENT TRIGGER pgrst_watch | |||
async fn functional_test_status_configs() { | |||
async fn runtime_cfg(coredbs: &Api<CoreDB>, name: &str) -> Option<Vec<PgConfig>> { | |||
let started_waiting = Utc::now(); | |||
let max_wait_time = chrono::Duration::seconds(45); | |||
let max_wait_time = chrono::TimeDelta::try_seconds(45).unwrap(); |
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.
Updating deprecated method https://docs.rs/chrono/latest/chrono/type.Duration.html#method.seconds
Since enabling snapshots with CNPG, we need a way to bring a potential new replica inline with the primary instance. Currently CNPG states that you must take a backup before bringing a new replica online.
We have opened an issue with CNPG in hopes to build a better solution to this problem. cloudnative-pg/cloudnative-pg#4125
Currently the logic works like this
if increasing replicas (1->2)
pending
orrunning
fixes: PLAT-117