Sometimes I need to insert a field or an index or make some more critical modification and often ask everyone to leave the base before I execute the command.
This command on my machine even with the application executes normally, but when I run the server the command hangs until all exit, I saw that depends on the tables in use.
I can not tell which users are using which tables, even because I use a single user to connect and the application is very dynamic.
I know that some commands will not work because they require exclusive access to the table.
How can I check if a particular table is in use and the command I'm about to execute can get stuck?
For example in a table with a field type Bytea I tried to add another field with the table in use, even though it is a simple field varchar being null it does not leave, even leaving the screen that uses the table and closing the table the command continues hanging until it leaves the application, that is, disconnecting even.