Skip to content

Implement and Document Listening Services #11

@jwp

Description

@jwp

Currently the support for Notify messages is pretty well undocumented. It looks like payload support is coming in 8.5, so it will be important for this to be more visible.

There are a few parts to implementing an appropriate set of listening interfaces:

  • Subscribe/Unsubscribe interface (basically, emit N-LISTEN $id statements)?
  • Notification hook management (punting here; single attribute, let user decide the implementation)
  • wait() method for simple event loops

The simple wait()[db.listen()?] method will perform pg_sleep() function calls in order to keep an active protocol transaction. This would allow for interrupts to take place, tho, not reliably(small windows between sleep() calls)..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions