summaryrefslogtreecommitdiff
path: root/src/include/catalog
diff options
context:
space:
mode:
authorTom Lane2010-02-16 22:34:57 +0000
committerTom Lane2010-02-16 22:34:57 +0000
commitd1e027221d0243b7b57eabb0e482923dd7d1c8eb (patch)
tree034988b788248c88fad3b73fb4d8d1afff2dd509 /src/include/catalog
parentfc5173ad514a216dc93bc190dbba3751024a257d (diff)
Replace the pg_listener-based LISTEN/NOTIFY mechanism with an in-memory queue.
In addition, add support for a "payload" string to be passed along with each notify event. This implementation should be significantly more efficient than the old one, and is also more compatible with Hot Standby usage. There is not yet any facility for HS slaves to receive notifications generated on the master, although such a thing is possible in future. Joachim Wieland, reviewed by Jeff Davis; also hacked on by me.
Diffstat (limited to 'src/include/catalog')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_listener.h59
-rw-r--r--src/include/catalog/pg_proc.h8
3 files changed, 8 insertions, 63 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 9a1d19380c7..2d63232b9b5 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.584 2010/02/12 17:33:20 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.585 2010/02/16 22:34:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 201002121
+#define CATALOG_VERSION_NO 201002161
#endif
diff --git a/src/include/catalog/pg_listener.h b/src/include/catalog/pg_listener.h
deleted file mode 100644
index 4d1a77d6602..00000000000
--- a/src/include/catalog/pg_listener.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_listener.h
- * Asynchronous notification
- *
- *
- * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $PostgreSQL: pgsql/src/include/catalog/pg_listener.h,v 1.28 2010/01/05 01:06:56 tgl Exp $
- *
- * NOTES
- * the genbki.pl script reads this file and generates .bki
- * information from the DATA() statements.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_LISTENER_H
-#define PG_LISTENER_H
-
-#include "catalog/genbki.h"
-
-/* ----------------------------------------------------------------
- * pg_listener definition.
- *
- * cpp turns this into typedef struct FormData_pg_listener
- * ----------------------------------------------------------------
- */
-#define ListenerRelationId 2614
-
-CATALOG(pg_listener,2614) BKI_WITHOUT_OIDS
-{
- NameData relname;
- int4 listenerpid;
- int4 notification;
-} FormData_pg_listener;
-
-/* ----------------
- * Form_pg_listener corresponds to a pointer to a tuple with
- * the format of pg_listener relation.
- * ----------------
- */
-typedef FormData_pg_listener *Form_pg_listener;
-
-/* ----------------
- * compiler constants for pg_listener
- * ----------------
- */
-#define Natts_pg_listener 3
-#define Anum_pg_listener_relname 1
-#define Anum_pg_listener_listenerpid 2
-#define Anum_pg_listener_notification 3
-
-/* ----------------
- * initial contents of pg_listener are NOTHING.
- * ----------------
- */
-
-#endif /* PG_LISTENER_H */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 727b13e264c..1c87a94a0de 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.568 2010/02/07 20:48:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.569 2010/02/16 22:34:56 tgl Exp $
*
* NOTES
* The script catalog/genbki.pl reads this file and generates .bki
@@ -4131,8 +4131,12 @@ DATA(insert OID = 2599 ( pg_timezone_abbrevs PGNSP PGUID 12 1 1000 0 f f f t t
DESCR("get the available time zone abbreviations");
DATA(insert OID = 2856 ( pg_timezone_names PGNSP PGUID 12 1 1000 0 f f f t t s 0 0 2249 "" "{25,25,1186,16}" "{o,o,o,o}" "{name,abbrev,utc_offset,is_dst}" _null_ pg_timezone_names _null_ _null_ _null_ ));
DESCR("get the available time zone names");
-DATA(insert OID = 2730 ( pg_get_triggerdef PGNSP PGUID 12 1 0 0 f f f t f s 2 0 25 "26 16" _null_ _null_ _null_ _null_ pg_get_triggerdef_ext _null_ _null_ _null_ ));
+DATA(insert OID = 2730 ( pg_get_triggerdef PGNSP PGUID 12 1 0 0 f f f t f s 2 0 25 "26 16" _null_ _null_ _null_ _null_ pg_get_triggerdef_ext _null_ _null_ _null_ ));
DESCR("trigger description with pretty-print option");
+DATA(insert OID = 3035 ( pg_listening_channels PGNSP PGUID 12 1 10 0 f f f t t s 0 0 25 "" _null_ _null_ _null_ _null_ pg_listening_channels _null_ _null_ _null_ ));
+DESCR("get the channels that the current backend listens to");
+DATA(insert OID = 3036 ( pg_notify PGNSP PGUID 12 1 0 0 f f f f f v 2 0 2278 "25 25" _null_ _null_ _null_ _null_ pg_notify _null_ _null_ _null_ ));
+DESCR("send a notification event");
/* non-persistent series generator */
DATA(insert OID = 1066 ( generate_series PGNSP PGUID 12 1 1000 0 f f f t t i 3 0 23 "23 23 23" _null_ _null_ _null_ _null_ generate_series_step_int4 _null_ _null_ _null_ ));