REVOKE CONNECT will not prevent the connections from the db owner or superuser. So if you don't want anyone to connect the db, follow command may be useful.
alter database pilot allow_connections = off;
Then use:
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE datname = 'pilot';