REVOKE command not working as expected - Mailing list pgsql-admin

From Guillermo Carrasco
Subject REVOKE command not working as expected
Date
Msg-id CAH-nkqnTO+MKFHBEk4jMH6WJUduc-ezXAepzsEc7kP2bx5u-jw@mail.gmail.com
Whole thread Raw
Responses Re: REVOKE command not working as expected  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-admin
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 Scientist

------------------------------------------------------------------------

pgsql-admin by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: using pg_upgrade on FreeBSD for postgresql installed by ports
Next
From: Scott Marlowe
Date:
Subject: Re: REVOKE command not working as expected