diff options
| author | vvvv <[email protected]> | 2024-11-07 12:29:36 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2024-11-07 13:49:47 +0300 |
| commit | d4c258e9431675bab6745c8638df6e3dfd4dca6b (patch) | |
| tree | b5efcfa11351152a4c872fccaea35749141c0b11 /yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h | |
| parent | 13a4f274caef5cfdaf0263b24e4d6bdd5521472b (diff) | |
Moved other yql/essentials libs YQL-19206
init
commit_hash:7d4c435602078407bbf20dd3c32f9c90d2bbcbc0
Diffstat (limited to 'yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h')
| -rw-r--r-- | yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h b/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h new file mode 100644 index 00000000000..76be04dbaef --- /dev/null +++ b/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/async.h @@ -0,0 +1,53 @@ +/*------------------------------------------------------------------------- + * + * async.h + * Asynchronous notification: NOTIFY, LISTEN, UNLISTEN + * + * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/commands/async.h + * + *------------------------------------------------------------------------- + */ +#ifndef ASYNC_H +#define ASYNC_H + +#include <signal.h> + +/* + * The number of SLRU page buffers we use for the notification queue. + */ +#define NUM_NOTIFY_BUFFERS 8 + +extern __thread PGDLLIMPORT bool Trace_notify; +extern __thread PGDLLIMPORT volatile sig_atomic_t notifyInterruptPending; + +extern Size AsyncShmemSize(void); +extern void AsyncShmemInit(void); + +extern void NotifyMyFrontEnd(const char *channel, + const char *payload, + int32 srcPid); + +/* notify-related SQL statements */ +extern void Async_Notify(const char *channel, const char *payload); +extern void Async_Listen(const char *channel); +extern void Async_Unlisten(const char *channel); +extern void Async_UnlistenAll(void); + +/* perform (or cancel) outbound notify processing at transaction commit */ +extern void PreCommit_Notify(void); +extern void AtCommit_Notify(void); +extern void AtAbort_Notify(void); +extern void AtSubCommit_Notify(void); +extern void AtSubAbort_Notify(void); +extern void AtPrepare_Notify(void); + +/* signal handler for inbound notifies (PROCSIG_NOTIFY_INTERRUPT) */ +extern void HandleNotifyInterrupt(void); + +/* process interrupts */ +extern void ProcessNotifyInterrupt(bool flush); + +#endif /* ASYNC_H */ |
