aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands/async.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/commands/async.h')
-rw-r--r--src/include/commands/async.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/include/commands/async.h b/src/include/commands/async.h
index 5c9e8ab8906..a9e4d42853d 100644
--- a/src/include/commands/async.h
+++ b/src/include/commands/async.h
@@ -6,28 +6,44 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/async.h,v 1.39 2010/01/02 16:58:03 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/async.h,v 1.40 2010/02/16 22:34:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef ASYNC_H
#define ASYNC_H
+#include "fmgr.h"
+
+/*
+ * The number of SLRU page buffers we use for the notification queue.
+ */
+#define NUM_ASYNC_BUFFERS 8
+
extern bool Trace_notify;
+extern Size AsyncShmemSize(void);
+extern void AsyncShmemInit(void);
+
/* notify-related SQL statements */
-extern void Async_Notify(const char *relname);
-extern void Async_Listen(const char *relname);
-extern void Async_Unlisten(const char *relname);
+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);
+/* notify-related SQL functions */
+extern Datum pg_listening_channels(PG_FUNCTION_ARGS);
+extern Datum pg_notify(PG_FUNCTION_ARGS);
+
/* 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 AtSubStart_Notify(void);
extern void AtSubCommit_Notify(void);
extern void AtSubAbort_Notify(void);
extern void AtPrepare_Notify(void);
+extern void ProcessCompletedNotifies(void);
/* signal handler for inbound notifies (PROCSIG_NOTIFY_INTERRUPT) */
extern void HandleNotifyInterrupt(void);
@@ -40,7 +56,4 @@ extern void HandleNotifyInterrupt(void);
extern void EnableNotifyInterrupt(void);
extern bool DisableNotifyInterrupt(void);
-extern void notify_twophase_postcommit(TransactionId xid, uint16 info,
- void *recdata, uint32 len);
-
#endif /* ASYNC_H */