You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either it emits an 'error' of some kind, or I my listener for the 64-character '...1234' channel gets called.
What happens
The LISTEN/NOTIFY calls get truncated in Postgres to 63 characters. Postgres doesn't emit any errors for this, though it will raise a notice about it in the console.
So the last two notify calls, both for the 64-character '...1234' and the 63-character '...123' cause the pg.Client to emit notification events for the 63-character '...123' channel.
pg-ipc then emits events on that 63-character '...123' channel...but the listener was registered on the EventEmitter with the 64-character '...1234' channel. So the listener never gets called.
Solutions
I'd say either
truncate the channel to 63 characters when registering the listener on the EventEmitter (matching Postgres behavior)
OR throw an error if on/notify is called with a channel longer than 63 characters.
The text was updated successfully, but these errors were encountered:
System
timescale/timescaledb:2.3.0-pg13
pg
version: 8.6.0pg-ipc
version: 1.0.5Repro code
Actual behavior
I only see the output
Expected behavior
Either it emits an
'error'
of some kind, or I my listener for the 64-character'...1234'
channel gets called.What happens
The
LISTEN
/NOTIFY
calls get truncated in Postgres to 63 characters. Postgres doesn't emit any errors for this, though it will raise a notice about it in the console.So the last two
notify
calls, both for the 64-character'...1234'
and the 63-character'...123'
cause thepg.Client
to emit notification events for the 63-character'...123'
channel.pg-ipc
then emits events on that 63-character'...123'
channel...but the listener was registered on theEventEmitter
with the 64-character'...1234'
channel. So the listener never gets called.Solutions
I'd say either
EventEmitter
(matching Postgres behavior)on
/notify
is called with a channel longer than 63 characters.The text was updated successfully, but these errors were encountered: