NOTIFY is transaction-safe: if the NOTIFY-ing transaction rolls back, the NOTIFY will not be delivered. See the discussion here ("NOTIFY interacts with SQL transactions in some important ways..."):
That one simple addition made pre-9.0 NOTIFY and post-9.0 NOTIFY completely different beasts.