Clear async.c's isAdvancing flag when a notify read is aborted. asyncQueueReadAllNotifications() sets our isAdvancing flag and clears it when done. But if we error out in between, for example on a cancel while waiting for a safe snapshot, the flag stays set and SignalBackends() never advances or wakes us again, so the queue tail stops moving. To fix, clear the flag in AtAbort_Notify(). (We need not worry about this in subtransaction abort, since asyncQueueReadAllNotifications() is only called in top-level transactions.)
Author: shihao zhong <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/CAGRkXqQ1bmVwBw2CXiyZeWWP=xkhpxlpcq7bsg2q5jksvda...@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1db74dc0ec7115075a031d3537542e1e1caba799 Modified Files -------------- src/backend/commands/async.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
