Skip to content

Add commands/async.h (LISTEN/NOTIFY) bindings#2344

Merged
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
isdaniel:feat/async-notify-binding
Jul 11, 2026
Merged

Add commands/async.h (LISTEN/NOTIFY) bindings#2344
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
isdaniel:feat/async-notify-binding

Conversation

@isdaniel

Copy link
Copy Markdown
Contributor

What

  • Bind commands/async.h in pgrx-pg-sys for pg13–pg19, exposing Async_Notify / Async_Listen / Async_Unlisten / Async_UnlistenAll.
  • Add a notify example: safe &str wrappers over those externs plus a real-world cache-invalidation trigger that NOTIFYs a changed row's id on cache_invalidation.

Why

LISTEN/NOTIFY is the only in-core mechanism for inter-process signalling substitute — delivery goes through Postgres's async queue. Server-side LISTEN in particular has no SQL-function equivalent.

@isdaniel
isdaniel force-pushed the feat/async-notify-binding branch from b35b564 to 62a5899 Compare June 28, 2026 07:59
feat(pgrx): safe notify/listen/unlisten wrappers over async.h
feat(examples): add coalesced transaction-end NOTIFY pattern
@isdaniel
isdaniel force-pushed the feat/async-notify-binding branch from 62a5899 to d6c295d Compare June 28, 2026 08:52
@eeeebbbbrrrr
eeeebbbbrrrr merged commit d781c29 into pgcentralfoundation:develop Jul 11, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants