Issue
The customer is getting an error while trying to create a follower DB via CLI where the follower DB gets stuck at the point - "Behind by: xxxx commits".
Resolution
-
Check to see if you've followed the instructions as mentioned here for creating a follower database: https://devcenter.heroku.com/articles/heroku-postgres-follower-databases#create-a-follower
-
Basically, if you run
heroku pg:ps
, you can see many long running queries (e.g. more than 8 hours). Long running queries on the follower database can cause it's being behind. It is recommended to kill those queries. Reference article here. -
You can kill all queries with
heroku pg:killall
, or you could useheroku pg:kill <pid from pg:ps command>
. If the query isn't killed with normalpg:kill
command, you want to try adding-f
option there.
Still having issues? Reach out to Heroku support.