The following bug has been logged on the website:
Bug reference: 18394
Logged by: Jon Zeppieri
Email address: zeppieri@gmail.com
PostgreSQL version: 16.2
Operating system: linux (debian bullseye)
Description:
This has come up before, but it seems this bug is still around. Somehow, a
NOTIFY queue refers to an xid that's been pruned. See, for example:
-
https://www.postgresql.org/message-id/flat/VE1PR03MB531295B1BDCFE422441B15FD92499%40VE1PR03MB5312.eurprd03.prod.outlook.com#7e36d1fdca921b5292e92c7017984ffa]
- https://github.com/PostgREST/postgrest/issues/3147
The result is that this happens:
db=# listen foo;
ERROR: could not access status of transaction 2716782599
DETAIL: Could not open file "pg_xact/0A1E": No such file or
directory.
The only thing I have to add to what's been reported before is that the
LISTENing connection -- the only one I know of, at any rate -- isn't
participating in any long transactions. It issues the LISTEN statement and
then just waits, indefinitely, for notifications outside of any transaction.
But maybe there was a different different LISTENing session that I wasn't
aware of. Is there a way to query for pids that are listening to
notification channels?
- Jon