PostgreSQL Source Code git master
Loading...
Searching...
No Matches
async.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * async.h
4 * Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
5 *
6 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * src/include/commands/async.h
10 *
11 *-------------------------------------------------------------------------
12 */
13#ifndef ASYNC_H
14#define ASYNC_H
15
16#include <signal.h>
17
18extern PGDLLIMPORT bool Trace_notify;
21
22extern void NotifyMyFrontEnd(const char *channel,
23 const char *payload,
24 int32 srcPid);
25
26/* notify-related SQL statements */
27extern void Async_Notify(const char *channel, const char *payload);
28extern void Async_Listen(const char *channel);
29extern void Async_Unlisten(const char *channel);
30extern void Async_UnlistenAll(void);
31
32/* perform (or cancel) outbound notify processing at transaction commit */
33extern void PreCommit_Notify(void);
34extern void AtCommit_Notify(void);
35extern void AtAbort_Notify(void);
36extern void AtSubCommit_Notify(void);
37extern void AtSubAbort_Notify(void);
38extern void AtPrepare_Notify(void);
39
40/* signal handler for inbound notifies (PROCSIG_NOTIFY_INTERRUPT) */
41extern void HandleNotifyInterrupt(void);
42
43/* process interrupts */
44extern void ProcessNotifyInterrupt(bool flush);
45
46/* freeze old transaction IDs in notify queue (called by VACUUM) */
48
49#endif /* ASYNC_H */
void HandleNotifyInterrupt(void)
Definition async.c:2550
PGDLLIMPORT bool Trace_notify
Definition async.c:581
void Async_UnlistenAll(void)
Definition async.c:1075
void NotifyMyFrontEnd(const char *channel, const char *payload, int32 srcPid)
Definition async.c:3097
void AtCommit_Notify(void)
Definition async.c:1378
void ProcessNotifyInterrupt(bool flush)
Definition async.c:2579
PGDLLIMPORT volatile sig_atomic_t notifyInterruptPending
Definition async.c:552
void AtAbort_Notify(void)
Definition async.c:2418
void PreCommit_Notify(void)
Definition async.c:1185
void Async_Unlisten(const char *channel)
Definition async.c:1057
void Async_Listen(const char *channel)
Definition async.c:1043
void AtSubAbort_Notify(void)
Definition async.c:2507
void AtPrepare_Notify(void)
Definition async.c:1160
PGDLLIMPORT int max_notify_queue_pages
Definition async.c:584
void AtSubCommit_Notify(void)
Definition async.c:2437
void Async_Notify(const char *channel, const char *payload)
Definition async.c:894
void AsyncNotifyFreezeXids(TransactionId newFrozenXid)
Definition async.c:2950
#define PGDLLIMPORT
Definition c.h:1421
int32_t int32
Definition c.h:620
uint32 TransactionId
Definition c.h:736
static int fb(int x)