]> granicus.if.org Git - postgresql/blob - src/include/commands/async.h
RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
[postgresql] / src / include / commands / async.h
1 /*-------------------------------------------------------------------------
2  *
3  * async.h
4  *        Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
5  *
6  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * $PostgreSQL: pgsql/src/include/commands/async.h,v 1.35 2007/04/12 06:53:48 neilc Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef ASYNC_H
14 #define ASYNC_H
15
16 extern bool Trace_notify;
17
18 /* notify-related SQL statements */
19 extern void Async_Notify(const char *relname);
20 extern void Async_Listen(const char *relname);
21 extern void Async_Unlisten(const char *relname);
22 extern void Async_UnlistenAll(void);
23
24 /* perform (or cancel) outbound notify processing at transaction commit */
25 extern void AtCommit_Notify(void);
26 extern void AtAbort_Notify(void);
27 extern void AtSubStart_Notify(void);
28 extern void AtSubCommit_Notify(void);
29 extern void AtSubAbort_Notify(void);
30 extern void AtPrepare_Notify(void);
31
32 /* signal handler for inbound notifies (SIGUSR2) */
33 extern void NotifyInterruptHandler(SIGNAL_ARGS);
34
35 /*
36  * enable/disable processing of inbound notifies directly from signal handler.
37  * The enable routine first performs processing of any inbound notifies that
38  * have occurred since the last disable.
39  */
40 extern void EnableNotifyInterrupt(void);
41 extern bool DisableNotifyInterrupt(void);
42
43 extern void notify_twophase_postcommit(TransactionId xid, uint16 info,
44                                                    void *recdata, uint32 len);
45
46 #endif   /* ASYNC_H */