Savepoint and prepared transactions - Mailing list pgsql-general

From Konstantin Izmailov
Subject Savepoint and prepared transactions
Date
Msg-id AANLkTil2xfv8m-nTZlMDMdbZ01KdlJ_rDxKv8KSGKu4o@mail.gmail.com
Whole thread Raw
Responses Re: Savepoint and prepared transactions  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: How can I be confirm that data is encrypted over the network using SSL
Next
From: Scott Marlowe
Date:
Subject: Re: Savepoint and prepared transactions