Using `heroku db:pull` works but takes a rather long time. I decided to try 
using pg_restore like this:

heroku pgbackups:capture --expire
curl -o latest.dump `heroku pgbackups:url`
pg_restore --clean --no-acl --no-owner -h localhost -U my_username -d 
local_db_name latest.dump

This works as expected, i.e. the correct data is retrieved and it is faster 
than using taps.

However, if I have a local Rails process which is connected to the local DB 
running when I import the production data, it starts reporting PG errors 
like

PG::Error: ERROR: relation "xxx" does not exist

After a restart of the Rails process, the errors disappear. Why is the 
Rails connection seeing that the relations are being dropped by importing 
the dump, but not seeing that they are being recreated and populated?

Any ideas on what might be going on and how to fix it?

Many thanks in advance!

-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

Reply via email to