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 a 'reasonable' amount of time. I wonder what other folks do?
Cheers,
Steve
On Thu, Jul 30, 2020 at 10:23 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Steve Baldwin <steve.baldwin@gmail.com> 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 USER ... SET ...).