Followup fixes for transaction_timeout
authorAlexander Korotkov <akorotkov@postgresql.org>
Fri, 16 Feb 2024 01:36:38 +0000 (03:36 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Fri, 16 Feb 2024 01:36:38 +0000 (03:36 +0200)
commitbf82f43790a675dd1b9522a7799357e61e7aa635
tree07c459ce59aadc3b8157112635c736976685ae20
parent51efe38cb92f4b15b68811bcce9ab878fbc71ea5
Followup fixes for transaction_timeout

Don't deal with transaction timeout in PostgresMain().  Instead, release
transaction timeout activated by StartTransaction() in
CommitTransaction()/AbortTransaction()/PrepareTransaction().  Deal with both
enabling and disabling transaction timeout in assign_transaction_timeout().

Also, remove potentially flaky timeouts-long isolation test, which has no
guarantees to pass on slow/busy machines.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20240215230856.pc6k57tqxt7fhldm%40awork3.anarazel.de
src/backend/access/transam/xact.c
src/backend/tcop/postgres.c
src/test/isolation/isolation_schedule
src/test/isolation/specs/timeouts-long.spec [deleted file]