summaryrefslogtreecommitdiff
path: root/src/include/commands/async.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1998-10-06 02:40:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1998-10-06 02:40:09 +0000
commitc77a29a14efe69851a087989e3520ed560fa8862 (patch)
tree351498a12d481c6ab7c52632441b2294a708f504 /src/include/commands/async.h
parente7e027a6c9ca2fde9c05da9fda8ea89d1a6296c6 (diff)
downloadpostgresql-c77a29a14efe69851a087989e3520ed560fa8862.tar.gz
Substantial rewrite of async.c to avoid problems with non-reentrant stdio
and possibly other problems. Minor changes in xact.c and postgres.c's main loop to support new handling of async NOTIFY.
Diffstat (limited to 'src/include/commands/async.h')
-rw-r--r--src/include/commands/async.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/include/commands/async.h b/src/include/commands/async.h
index 2c9d0a348a..5494b0f6c7 100644
--- a/src/include/commands/async.h
+++ b/src/include/commands/async.h
@@ -1,27 +1,38 @@
/*-------------------------------------------------------------------------
*
* async.h--
- *
- *
+ * Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: async.h,v 1.9 1998/09/01 04:35:22 momjian Exp $
+ * $Id: async.h,v 1.10 1998/10/06 02:40:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef ASYNC_H
#define ASYNC_H
-#include <nodes/memnodes.h>
+#include <postgres.h>
-extern void Async_NotifyHandler(SIGNAL_ARGS);
+/* notify-related SQL statements */
extern void Async_Notify(char *relname);
-extern void Async_NotifyAtCommit(void);
-extern void Async_NotifyAtAbort(void);
extern void Async_Listen(char *relname, int pid);
extern void Async_Unlisten(char *relname, int pid);
-extern GlobalMemory notifyContext;
+/* perform (or cancel) outbound notify processing at transaction commit */
+extern void AtCommit_Notify(void);
+extern void AtAbort_Notify(void);
+
+/* signal handler for inbound notifies (SIGUSR2) */
+extern void Async_NotifyHandler(SIGNAL_ARGS);
+
+/*
+ * enable/disable processing of inbound notifies directly from signal handler.
+ * The enable routine first performs processing of any inbound notifies that
+ * have occurred since the last disable. These are meant to be called ONLY
+ * from the appropriate places in PostgresMain().
+ */
+extern void EnableNotifyInterrupt(void);
+extern void DisableNotifyInterrupt(void);
#endif /* ASYNC_H */