Skip to content

Commit f735eae

Browse files
authored
When creating from an existing PGDATA, fix missing initialization. (#802)
1 parent c52ad9c commit f735eae

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/bin/pg_autoctl/keeper_pg_init.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,16 @@ keeper_pg_init_and_register(Keeper *keeper)
137137
{
138138
bool dropped = false;
139139

140+
/* initialize our local Postgres instance representation */
141+
LocalPostgresServer *postgres = &(keeper->postgres);
142+
143+
(void) local_postgres_init(postgres, pgSetup);
144+
140145
if (!keeper_ensure_node_has_been_dropped(keeper, &dropped))
141146
{
142-
log_fatal("Failed to determine if node %d with current state \"%s\" "
143-
" in formation \"%s\" and group %d "
144-
"has been dropped from the monitor, see above for details",
147+
log_fatal("Failed to determine if node %d with current state \"%s\""
148+
" in formation \"%s\" and group %d"
149+
" has been dropped from the monitor, see above for details",
145150
keeper->state.current_node_id,
146151
NodeStateToString(keeper->state.current_role),
147152
keeper->config.formation,

0 commit comments

Comments
 (0)