diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-15 23:34:11 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-02-15 23:56:12 +0200 |
commit | 51efe38cb92f4b15b68811bcce9ab878fbc71ea5 (patch) | |
tree | d51bcdea74cd327444b5a00632a951b5b82baa48 /src/include/storage/proc.h | |
parent | 5c9f2f9398b46a283dcdf4366aaeb06eb04aa76a (diff) |
Introduce transaction_timeout
This commit adds timeout that is expected to be used as a prevention
of long-running queries. Any session within the transaction will be
terminated after spanning longer than this timeout.
However, this timeout is not applied to prepared transactions.
Only transactions with user connections are affected.
Discussion: https://postgr.es/m/CAAhFRxiQsRs2Eq5kCo9nXE3HTugsAAJdSQSmxncivebAxdmBjQ%40mail.gmail.com
Author: Andrey Borodin <amborodin@acm.org>
Author: Japin Li <japinli@hotmail.com>
Author: Junwang Zhao <zhjwpku@gmail.com>
Reviewed-by: Nikolay Samokhvalov <samokhvalov@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: bt23nguyent <bt23nguyent@oss.nttdata.com>
Reviewed-by: Yuhang Qiu <iamqyh@gmail.com>
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r-- | src/include/storage/proc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 4bc226e36cd..20d6fa652dc 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -429,6 +429,7 @@ extern PGDLLIMPORT int DeadlockTimeout; extern PGDLLIMPORT int StatementTimeout; extern PGDLLIMPORT int LockTimeout; extern PGDLLIMPORT int IdleInTransactionSessionTimeout; +extern PGDLLIMPORT int TransactionTimeout; extern PGDLLIMPORT int IdleSessionTimeout; extern PGDLLIMPORT bool log_lock_waits; |