mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
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.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.12 2010/01/02 16:57:35 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.13 2010/02/16 22:34:43 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include "access/multixact.h"
|
||||
#include "access/twophase_rmgr.h"
|
||||
#include "commands/async.h"
|
||||
#include "pgstat.h"
|
||||
#include "storage/lock.h"
|
||||
|
||||
@@ -25,7 +24,6 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
{
|
||||
NULL, /* END ID */
|
||||
lock_twophase_recover, /* Lock */
|
||||
NULL, /* notify/listen */
|
||||
NULL, /* pgstat */
|
||||
multixact_twophase_recover /* MultiXact */
|
||||
};
|
||||
@@ -34,7 +32,6 @@ const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
{
|
||||
NULL, /* END ID */
|
||||
lock_twophase_postcommit, /* Lock */
|
||||
notify_twophase_postcommit, /* notify/listen */
|
||||
pgstat_twophase_postcommit, /* pgstat */
|
||||
multixact_twophase_postcommit /* MultiXact */
|
||||
};
|
||||
@@ -43,7 +40,6 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
||||
{
|
||||
NULL, /* END ID */
|
||||
lock_twophase_postabort, /* Lock */
|
||||
NULL, /* notify/listen */
|
||||
pgstat_twophase_postabort, /* pgstat */
|
||||
multixact_twophase_postabort /* MultiXact */
|
||||
};
|
||||
@@ -52,7 +48,6 @@ const TwoPhaseCallback twophase_standby_recover_callbacks[TWOPHASE_RM_MAX_ID + 1
|
||||
{
|
||||
NULL, /* END ID */
|
||||
lock_twophase_standby_recover, /* Lock */
|
||||
NULL, /* notify/listen */
|
||||
NULL, /* pgstat */
|
||||
NULL /* MultiXact */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user