So I managed to accidentally kill and/or restart both servers while trying to install debug symbols, but I'm doing a new run now and I noticed something interesting: the listening backend's RecentXmin doesn't seem to ever go forward. By my reading of this code, that would mean trouble for this piece of code in TransactionIdIsInProgress:
if (TransactionIdPrecedes(xid, RecentXmin))
return false;
Is this not an obvious bug? async.c would think the transaction is not running, and did not commit -> throw away the notification. That would also explain why it takes days for this to happen (since we need to run through enough xids to wrap around).
.m