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
Author: Japin Li
Author: Junwang Zhao
Reviewed-by: Nikolay Samokhvalov
Reviewed-by: Andres Freund
Reviewed-by: Fujii Masao
Reviewed-by: bt23nguyent
Reviewed-by: Yuhang Qiu