pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #13940: rollback prepared is not working 2+ messages / 2 participants [nested] [flat]
* BUG #13940: rollback prepared is not working @ 2016-02-10 10:46 prathameshsonavane@gmail.com 0 siblings, 1 reply; 2+ messages in thread From: prathameshsonavane@gmail.com @ 2016-02-10 10:46 UTC (permalink / raw) To: pgsql-bugs 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'; UPDATE xyz SET jkl=20 WHERE lmn="XX"; ) Now it will change value of jkl to 20. Now i am executing following query b4 "commit prepared B": ( rollback PREPARED 'B'; ) indeed..it shud set jkl to its old value.but, still its showing 20 after issuing this command. its very annoying. :( -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #13940: rollback prepared is not working @ 2016-02-10 16:52 Jeff Janes <jeff.janes@gmail.com> parent: prathameshsonavane@gmail.com 0 siblings, 0 replies; 2+ messages in thread From: Jeff Janes @ 2016-02-10 16:52 UTC (permalink / raw) To: prathameshsonavane@gmail.com; +Cc: 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-02-10 16:52 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-02-10 10:46 BUG #13940: rollback prepared is not working prathameshsonavane@gmail.com 2016-02-10 16:52 ` Jeff Janes <jeff.janes@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox