Don't repeatedly register cache callbacks in pgoutput plugin.
[pgsql.git] / src / include / commands / async.h
blobd132fd59991f7383de9ae8e23b6beff2440cbd07
1 /*-------------------------------------------------------------------------
3 * async.h
4 * Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
6 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/commands/async.h
11 *-------------------------------------------------------------------------
13 #ifndef ASYNC_H
14 #define ASYNC_H
16 #include <signal.h>
18 #include "fmgr.h"
21 * The number of SLRU page buffers we use for the notification queue.
23 #define NUM_ASYNC_BUFFERS 8
25 extern bool Trace_notify;
26 extern volatile sig_atomic_t notifyInterruptPending;
28 extern Size AsyncShmemSize(void);
29 extern void AsyncShmemInit(void);
31 extern void NotifyMyFrontEnd(const char *channel,
32 const char *payload,
33 int32 srcPid);
35 /* notify-related SQL statements */
36 extern void Async_Notify(const char *channel, const char *payload);
37 extern void Async_Listen(const char *channel);
38 extern void Async_Unlisten(const char *channel);
39 extern void Async_UnlistenAll(void);
41 /* perform (or cancel) outbound notify processing at transaction commit */
42 extern void PreCommit_Notify(void);
43 extern void AtCommit_Notify(void);
44 extern void AtAbort_Notify(void);
45 extern void AtSubStart_Notify(void);
46 extern void AtSubCommit_Notify(void);
47 extern void AtSubAbort_Notify(void);
48 extern void AtPrepare_Notify(void);
49 extern void ProcessCompletedNotifies(void);
51 /* signal handler for inbound notifies (PROCSIG_NOTIFY_INTERRUPT) */
52 extern void HandleNotifyInterrupt(void);
54 /* process interrupts */
55 extern void ProcessNotifyInterrupt(void);
57 #endif /* ASYNC_H */