On Fri, Oct 12, 2018 at 02:28:36PM +0800, Richard Guo wrote: > I think it is a better idea to avoid adjusting the state to TRANS_INPROGRESS > from TRANS_START when aborting a transaction, as your patch does, since its > only purpose is to suppress warning message.
Actually, as StartSubTransaction also switches to TRANS_START for a savepoint, if there is an error until the state is switched to TRANS_INPROGRESS then the code would fail to switch back to CurrentUserId even if it is set, and it should be switched. So that solution is not correct either as AtSubStart_ResourceOwner() or such could fail on memory allocation. That's unlikely going to happen, but it could. -- Michael
signature.asc
Description: PGP signature