Skip to content

Commit

Permalink
When creating from an existing PGDATA, fix missing initialization. (#802
Browse files Browse the repository at this point in the history
)
  • Loading branch information
DimCitus committed Sep 8, 2021
1 parent c52ad9c commit f735eae
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/bin/pg_autoctl/keeper_pg_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,16 @@ keeper_pg_init_and_register(Keeper *keeper)
{
bool dropped = false;

/* initialize our local Postgres instance representation */
LocalPostgresServer *postgres = &(keeper->postgres);

(void) local_postgres_init(postgres, pgSetup);

if (!keeper_ensure_node_has_been_dropped(keeper, &dropped))
{
log_fatal("Failed to determine if node %d with current state \"%s\" "
" in formation \"%s\" and group %d "
"has been dropped from the monitor, see above for details",
log_fatal("Failed to determine if node %d with current state \"%s\""
" in formation \"%s\" and group %d"
" has been dropped from the monitor, see above for details",
keeper->state.current_node_id,
NodeStateToString(keeper->state.current_role),
keeper->config.formation,
Expand Down

0 comments on commit f735eae

Please sign in to comment.