SET transaction_timeout inside a transaction - Mailing list pgsql-novice

Hello,

It appears that changing the transaction_timeout when inside a transaction does not work as expected.

Running the following script on master:

SET transaction_timeout = '1s';
BEGIN;
SET transaction_timeout = '3s';
SELECT pg_sleep(2);

Fails with the following:

FATAL:  terminating connection due to transaction timeout
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

A workaround is to "SET transaction_timeout = 0" before each override. But this resets the timer, which may not be
alignedwith this parameter's intention.
 

Thank you,
Best regards,

Quentin de Metz




pgsql-novice by date:

Previous
From: TIM CHILD
Date:
Subject: Re: Can we lock or expire a ROLE / USER
Next
From: Tom Lane
Date:
Subject: Re: SET transaction_timeout inside a transaction