Re: BUG #13940: rollback prepared is not working
От | Jeff Janes |
---|---|
Тема | Re: BUG #13940: rollback prepared is not working |
Дата | |
Msg-id | CAMkU=1zcbZZRjwhjQuQ=Y6zHUomKtUKMXNnSzwuiogyO4pxCtg@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #13940: rollback prepared is not working (prathameshsonavane@gmail.com) |
Список | pgsql-bugs |
On Wed, Feb 10, 2016 at 2:46 AM, <prathameshsonavane@gmail.com> wrote: > The following bug has been logged on the website: > > Bug reference: 13940 > Logged by: Prathamesh Sonavane > Email address: prathameshsonavane@gmail.com > PostgreSQL version: 9.2.14 > Operating system: windows 7 enterprise > Description: > > I am trying following prepared transaction: > > ( > BEGIN TRANSACTION; > PREPARE TRANSACTION 'B'; You have just started a transaction, and then immediately frozen the transaction. That transaction is now over, other than to commit it or roll it back. Anything done after this point will be part of a different transaction. You have to put the "prepare transaction" at the end of the transaction, where the commit would otherwise go. Not immediately after the BEGIN. > UPDATE xyz > SET jkl=20 WHERE lmn="XX"; Now you have a new single-statement transaction which was automatically committed. > ) > > Now it will change value of jkl to 20. > Now i am executing following query b4 "commit prepared B": > > ( > rollback PREPARED 'B'; > ) > Now you have rolled back a prepared transaction, but that transaction was empty, so rolling it back didn't do anything. So, this is not a bug, it is operating as designed. Cheers, Jeff
В списке pgsql-bugs по дате отправления: