Jeff Boes <jboes@nexcerpt.com> writes:
> What causes the contents of pg_listener to "linger" long past the lifespan of
> the associated database backend? My table has rows that I know must be days old.
PG version?
I have a vague recollection of old bugs that prevented pg_listener rows
from being scavenged during backend exit, but they're all gone AFAIK.
The only remaining condition that would account for this is a crash of
the listening backend, but I trust that's not what you're dealing with.
In any case, if there is a row for a dead backend it should be removed
the first time someone tries to "notify" that condition name and
discovers that he can't signal the dead backend. If you've got days-old
dead rows they must be for very-infrequently-notified conditions.
regards, tom lane