Hi everyone,
--
We have a small script that we use to replicate our database from our production server to a stage one, where we do the development. More than a "replication" is a copy, so what it does is deletes everything on stage and then copies everything from production to stage. We do this at the beginning of the week to keep both databases in synch whilst during the week the developers can experiment. Here is the script: https://github.com/guillermo-carrasco/scilifelab/blob/master/scripts/dbsync.sh
The problem is that sometimes (apparently random), even after having invoked EVOKE CONNECT ON DATABASE \"$DB\" FROM PUBLIC;, when the scripts starts dumping, it fails because it says that there are some active connections.
I do not understand what's going on here, theoretically, if I prevent connections and after that I revoke all the existing ones, I shouldn't see that problem, right?
Any help is very appreciated.
Thanks in advance!
------------------------------------------------------------------------
Guillermo Carrasco Hernández, Computer ScientistLinkedIn: http://linkd.in/XeFUSB
Personal blog: http://mussolblog.wordpress.com/
------------------------------------------------------------------------