Re: Transaction prevention

2020-07-29 Thread Tom Lane
Steve Baldwin writes: > Thanks Tom. The idle_in_transaction_session_timeout could work well, but it > seems to be just a default that can be overridden by a user post-login (or > am I missing something?). It is that, but if you have an actively malicious user then you need to keep them from issui

Re: Transaction prevention

2020-07-29 Thread Steve Baldwin
Thanks Tom. The idle_in_transaction_session_timeout could work well, but it seems to be just a default that can be overridden by a user post-login (or am I missing something?). I'm thinking of setting lock_timeout as part of the migration process so it will fail if it is unable to obtain a lock in

Re: Transaction prevention

2020-07-29 Thread Tom Lane
Steve Baldwin writes: > If I have a user that is restricted to select access (only) on a single > table, is there any way to prevent that user from starting a transaction? No, but maybe setting statement_timeout and/or idle_in_transaction_session_timeout for that user would be helpful (cf ALTER U

Transaction prevention

2020-07-29 Thread Steve Baldwin
Hi, If I have a user that is restricted to select access (only) on a single table, is there any way to prevent that user from starting a transaction? The reason for the question is that the select-only user can block another session trying to run an alter table on that table if the select-only us