yjhjstz commented on PR #1964:
URL: https://github.com/apache/cloudberry/pull/1964#issuecomment-5573005068

   
   
   
   > LGTM,
   > 
   > Changing the pruning rule must not destroy is the history entry of an 
interconnect instance belonging to a still-open cursor.
   > 
   > And this is true:
   > 
   > * Non-holdable cursors can only exist inside an explicit transaction block 
(commands/portalcmds.c:77-78, RequireTransactionBlock), where lxid is constant 
→ no prune.
   > * WITH HOLD cursors are drained into a tuplestore at commit 
(PersistHoldablePortal, portalcmds.c:424) and the executor is shut down, so no 
live interconnect crosses the boundary.
   > 
   > Also here we fixed other bug with cursors:
   > 
   > BEGIN; DECLARE c CURSOR FOR ; -- dxid still Invalid FETCH 1 FROM c; INSERT 
...; -- setupDtxTransaction() assigns gxid N Do something with ; -- Invalid != 
N → prune fires, c still open, got race here
   > 
   > Maybe we should add here regression tests, but I'm not sure if they are 
valid for our case, we could add it and be sure that covered the issue. So in 
overall LGTM
   
   I tested cursor case, It works fine. But hard to add to regression test.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to