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-06-18 00:32:51 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/commands/async.h,v 1.28 2005/06/17 22:32:49 tgl 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);
|
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,
|
|
|
|
void *recdata, uint32 len);
|
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* ASYNC_H */
|