Dear Álvaro, > Okay, I spent some more time trying to rewrite these comments in the new > function so that they explain what we're doing in terms we use elsewhere > in the code, and according to my understanding of how this works. The > phrasing proposed by Bingshuai contains some terms that we don't use > anywhere else, such as "a decoding pass" and other variations thereof, > referring to the logical decoding "session". I would appreciate a > review for correctness; if it's wrong, please propose fixes as minimal > as possible (that is, not a complete rewrite).
I checked your proposal, LGTM. > By the way, the assurance that with this coding we will never call > bsearch() with a NULL subxact array seems a bit too trusting ... I think > we should just add the "return false" if nsubxacts == 0 in > TransactionIdInSubxactArray() just to be on the safe side. It costs > nothing. The cfbot detected the issue, so +1 to add in TransactionIdInSubxactArray(). [1]: https://github.com/postgres/postgres-cfbot/actions/runs/38178880728/job/114587272272 Best regards, Hayato Kuroda FUJITSU LIMITED
