Answer the question
In order to leave comments, you need to log in
How to stop postgresql server?
there is a postgresql server, there are a lot of connections to it from applications with insert to one table at some point we tell applications that we don’t need to do insert anymore, but this message may be late and someone can still do insert. it is possible to force applications before insert to pass through some global mutex but it is not an option. I am now doing a lock table after which no insert will work and then you need to either pull some script with iptables that closes the port or stop the server (I'm afraid that when you stop the lock will be released before the possible locked insert and the insert will have time to work) or let's say change the port on the fly or some property in the server. how would you do it?

Answer the question
In order to leave comments, you need to log in
What for to lock the table when it is possible to take away the rights to an insert simply.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question