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
|
|
|
*
|
2004-12-31 23:04:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2005, 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
|
|
|
*
|
2005-10-15 04:49:52 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/commands/async.h,v 1.30 2005/10/15 02:49:44 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 */
|
2005-10-06 23:30:39 +02:00
|
|
|
extern void Async_Notify(const char *relname);
|
|
|
|
extern void Async_Listen(const char *relname);
|
|
|
|
extern void Async_Unlisten(const char *relname);
|
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);
|
2004-07-01 02:52:04 +02:00
|
|
|
extern void AtSubStart_Notify(void);
|
|
|
|
extern void AtSubCommit_Notify(void);
|
|
|
|
extern void AtSubAbort_Notify(void);
|
2005-06-18 00:32:51 +02:00
|
|
|
extern void AtPrepare_Notify(void);
|
1998-10-06 04:40:09 +02:00
|
|
|
|
|
|
|
/* signal handler for inbound notifies (SIGUSR2) */
|
2004-05-23 05:50:45 +02:00
|
|
|
extern void NotifyInterruptHandler(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
|
2004-05-23 05:50:45 +02:00
|
|
|
* have occurred since the last disable.
|
1998-10-06 04:40:09 +02:00
|
|
|
*/
|
|
|
|
extern void EnableNotifyInterrupt(void);
|
2004-05-23 05:50:45 +02:00
|
|
|
extern bool DisableNotifyInterrupt(void);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2005-06-18 00:32:51 +02:00
|
|
|
extern void notify_twophase_postcommit(TransactionId xid, uint16 info,
|
2005-10-15 04:49:52 +02:00
|
|
|
void *recdata, uint32 len);
|
2005-06-18 00:32:51 +02:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* ASYNC_H */
|