Skip to content

Commit 1ef91d2

Browse files
authored
Support for pg_notify (#11)
1 parent 6fa3ddd commit 1ef91d2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/backend/commands/async.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@
144144
#include "utils/snapmgr.h"
145145
#include "utils/timestamp.h"
146146

147+
#ifdef EMSCRIPTEN
148+
#include <emscripten.h>
149+
#endif
147150

148151
/*
149152
* Maximum size of a NOTIFY payload, including terminating NULL. This
@@ -1676,6 +1679,12 @@ SignalBackends(void)
16761679
BackendId *ids;
16771680
int count;
16781681

1682+
#ifdef EMSCRIPTEN
1683+
// With PGlite we call HandleNotifyInterrupt() directly
1684+
HandleNotifyInterrupt();
1685+
return;
1686+
#endif
1687+
16791688
/*
16801689
* Identify backends that we need to signal. We don't want to send
16811690
* signals while holding the NotifyQueueLock, so this loop just builds a

0 commit comments

Comments
 (0)