1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* async.h
|
1998-10-06 04:40:09 +02:00
|
|
|
* Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2001-11-05 18:46:40 +01:00
|
|
|
* $Id: async.h,v 1.20 2001/11/05 17:46:33 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef ASYNC_H
|
|
|
|
#define ASYNC_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
extern bool Trace_notify;
|
|
|
|
|
1998-10-06 04:40:09 +02:00
|
|
|
/* notify-related SQL statements */
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void Async_Notify(char *relname);
|
|
|
|
extern void Async_Listen(char *relname, int pid);
|
1998-08-25 23:37:08 +02:00
|
|
|
extern void Async_Unlisten(char *relname, int pid);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1998-10-06 04:40:09 +02:00
|
|
|
/* 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) */
|
2000-08-29 11:36:51 +02:00
|
|
|
extern void Async_NotifyHandler(SIGNAL_ARGS);
|
1998-10-06 04:40:09 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* ASYNC_H */
|