my-ship-it commented on issue #1717:
URL: https://github.com/apache/cloudberry/issues/1717#issuecomment-4403778094

   Thanks for the detailed report, @woblerr — the traceback and root-cause 
walk-through are really helpful here. You've correctly identified the race: 
`gpactivatestandby` writes the trigger file and then immediately invokes 
`gpstart -c`, which calls `initFromCatalog` before the standby has finished 
exiting recovery, so the connection is rejected with *"the database system is 
not accepting connections / Hot standby mode is disabled"*. The coordinator 
does promote, but the CRITICAL exit skips the segment-startup step, which is 
why a second `gpstart` is needed to fully recover.
   
   Waiting for promotion to complete (e.g., polling `pg_is_in_recovery()` or 
retrying the catalog connection with a bounded timeout) inside 
`gpactivatestandby` before calling `gpstart -c` looks like the right fix — it 
keeps the retry logic scoped to the activation path rather than leaking into 
the general `gpstart` flow.
   
   Looking forward to your PR! Happy to review once it's up. 🙌


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to