Re: BUG #15977: Inconsistent behavior in chained transactions

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: BUG #15977: Inconsistent behavior in chained transactions
Дата
Msg-id alpine.DEB.2.21.1908251101540.9896@lancre
обсуждение исходный текст
Ответ на BUG #15977: Inconsistent behavior in chained transactions  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15977: Inconsistent behavior in chained transactions  (fn ln <emuser20140816@gmail.com>)
Re: BUG #15977: Inconsistent behavior in chained transactions  (fn ln <emuser20140816@gmail.com>)
Список pgsql-bugs
> The following bug has been logged on the website:
>
> Bug reference:      15977
> Logged by:          mtlh kdvt
> Email address:      emuser20140816@gmail.com
> PostgreSQL version: 12beta3
> Operating system:   Windows
> Description:
>
> When a ROLLBACK AND CHAIN command is executed in the implicit transaction
> block, a new transaction will be started:
>   db=# ROLLBACK AND CHAIN;
>   WARNING:  there is no transaction in progress
>   ROLLBACK
>   db=# ROLLBACK AND CHAIN;
>   ROLLBACK
>
> However, a COMMIT AND CHAIN command won't start a new transaction:
>   db=# COMMIT AND CHAIN;
>   WARNING:  there is no transaction in progress
>   COMMIT
>   db=# COMMIT AND CHAIN;
>   WARNING:  there is no transaction in progress
>   COMMIT

Thanks for the report.

Indeed, I confirm, and I should have caught this one while reviewing…

Doc says:

"If AND CHAIN is specified, a new transaction is immediately started with 
the same transaction characteristics as the just finished one. Otherwise, 
no new transaction is started."

If there is no transaction in progress, the spec is undefined. Logically, 
ITSM that there should be no tx reset if none was in progress, so ROLLBACK 
has the wrong behavior?

A quick glance at the code did not yield any obvious culprit, but maybe 
I'm not looking at the right piece of code.

Doc could happend ", if any" to be clearer.

-- 
Fabien.

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15977: Inconsistent behavior in chained transactions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL12 crash bug report