REVOKE command not working as expected

From: Guillermo Carrasco <guillermo(dot)carrasco(at)scilifelab(dot)se>
To: pgsql-admin(at)postgresql(dot)org
Subject: REVOKE command not working as expected
Date: 2013-11-12 14:58:12
Message-ID: CAH-nkqnTO+MKFHBEk4jMH6WJUduc-ezXAepzsEc7kP2bx5u-jw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

GitHub: https://github.com/guillermo-carrasco
LinkedIn: http://linkd.in/XeFUSB<http://www.linkedin.com/pub/guillermo-carrasco-hern%C3%A1ndez/43/760/220>
Personal blog: http://mussolblog.wordpress.com/
------------------------------------------------------------------------

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2013-11-12 15:01:17 Re: REVOKE command not working as expected
Previous Message Luca Ferrari 2013-11-12 07:27:09 Re: using pg_upgrade on FreeBSD for postgresql installed by ports