Search Postgresql Archives

Savepoint and prepared transactions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I'm working on a solution that utilizes 2 phase commit protocol (between SQL Server and PostgreSQL). Normally PostgreSQL statements sequense is:
1. START
2. <inserts, updates, etc.>
3. PREPARE TRANSACTION 'uuid'
4. COMMIT PREPARED 'uuid'
 
What if on step 2 user application issues statements with SAVEPOINTs, e.g.
2.1. SAVEPOINT svp1
2.2. <inserts, updates, etc.>
2.3. SAVEPOINT svp2
2.4. <inserts, updates, etc.>
2.5. RELEASE SAVEPOINT svp2
2.6. ROLLBACK TO SAVEPOINT svp1
2.7. <inserts, updates, etc.>
 
Is this allowed and safe to use?
 
Thanks,
Konstantin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux