File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
src/backend/access/transam Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -190,13 +190,21 @@ void* writer(void* arg)
190190 i -= 1 ;
191191 continue ;
192192 }
193- pipeline srcPipe (srcTx);
194- pipeline dstPipe (dstTx);
195- srcPipe.insert (" commit transaction" );
196- dstPipe.insert (" commit transaction" );
197- srcPipe.complete ();
198- dstPipe.complete ();
199-
193+ try {
194+ pipeline srcPipe (srcTx);
195+ pipeline dstPipe (dstTx);
196+ pipeline::query_id q1 = srcPipe.insert (" commit transaction" );
197+ pipeline::query_id q2 = dstPipe.insert (" commit transaction" );
198+ // srcPipe.complete();
199+ // dstPipe.complete();
200+ srcPipe.retrieve (q1);
201+ dstPipe.retrieve (q2);
202+ } catch (pqxx_exception const & x) {
203+ t.aborts += 1 ;
204+ i -= 1 ;
205+ continue ;
206+ }
207+
200208 t.proceeded += 1 ;
201209 }
202210 return NULL ;
Original file line number Diff line number Diff line change @@ -1313,6 +1313,7 @@ RecordTransactionCommit(void)
13131313 END_CRIT_SECTION ();
13141314 if (!committed ) {
13151315 CurrentTransactionState -> state = TRANS_ABORT ;
1316+ CurrentTransactionState -> blockState = TBLOCK_ABORT_PENDING ;
13161317 elog (ERROR , "Transaction commit rejected by XTM" );
13171318 }
13181319 }
You can’t perform that action at this time.
0 commit comments