Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Are there any posibilities to prevent users invoke \du command in Postgres ?
What are Users doing in your database, running psql directly at all?
Unless your security model is exceedingly good, this is hugely dangerous.
Users should not be allowed anywhere near the "raw" database, and especially not anywhere near the Production one!