Re: Do we need to handle orphaned prepared transactions in theserver?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Do we need to handle orphaned prepared transactions in theserver?
Дата
Msg-id d5ee5dde-34b9-16d4-0074-60689627442c@gmx.net
обсуждение исходный текст
Ответ на Do we need to handle orphaned prepared transactions in the server?  (Hamid Akhtar <hamid.akhtar@gmail.com>)
Список pgsql-hackers
> First and foremost is to define what an orphaned transaction is. At
> this stage, I believe any prepared transaction that has been there
> for more than X time may be considered as an orphan. X may be defined
> as an integer in seconds (a GUC perhaps). May be there are better
> ways to define this. Please feel free to chime in.


What about specifying a timeout when starting the prepared transaction?

I can imagine situations where a timeout of hours might be needed/anticipated
(e.g. really slow external systems) and situations where the developer
knows that the other systems are never slower than a few seconds.

Something like:

   prepare transaction 42 timeout interval '2 days';

or

   prepare transaction 42 timeout interval '30 second';

Or maybe even with a fixed timestamp instead of an interval?

   prepare transaction 42 timeout timestamp '2020-01-30 14:00:00';

Thomas



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: ssl passphrase callback
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum