Skip to content

Commit

Permalink
Support for pg_notify (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
samwillis authored Jun 25, 2024
1 parent 6fa3ddd commit 1ef91d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/backend/commands/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@
#include "utils/snapmgr.h"
#include "utils/timestamp.h"

#ifdef EMSCRIPTEN
#include <emscripten.h>
#endif

/*
* Maximum size of a NOTIFY payload, including terminating NULL. This
Expand Down Expand Up @@ -1676,6 +1679,12 @@ SignalBackends(void)
BackendId *ids;
int count;

#ifdef EMSCRIPTEN
// With PGlite we call HandleNotifyInterrupt() directly
HandleNotifyInterrupt();
return;
#endif

/*
* Identify backends that we need to signal. We don't want to send
* signals while holding the NotifyQueueLock, so this loop just builds a
Expand Down

0 comments on commit 1ef91d2

Please sign in to comment.