2005-06-18 00:32:51 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* twophase_rmgr.c
|
|
|
|
* Two-phase-commit resource managers tables
|
|
|
|
*
|
2009-01-01 18:24:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
2005-06-18 00:32:51 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* IDENTIFICATION
|
2009-01-01 18:24:05 +01:00
|
|
|
* $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.8 2009/01/01 17:23:36 momjian Exp $
|
2005-06-18 00:32:51 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#include "postgres.h"
|
|
|
|
|
|
|
|
#include "access/twophase_rmgr.h"
|
|
|
|
#include "commands/async.h"
|
2007-05-27 05:50:39 +02:00
|
|
|
#include "pgstat.h"
|
2005-06-18 00:32:51 +02:00
|
|
|
#include "storage/lock.h"
|
|
|
|
#include "utils/flatfiles.h"
|
|
|
|
#include "utils/inval.h"
|
|
|
|
|
|
|
|
|
2005-10-15 04:49:52 +02:00
|
|
|
const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
2005-06-18 00:32:51 +02:00
|
|
|
{
|
2005-10-15 04:49:52 +02:00
|
|
|
NULL, /* END ID */
|
|
|
|
lock_twophase_recover, /* Lock */
|
|
|
|
NULL, /* Inval */
|
|
|
|
NULL, /* flat file update */
|
2007-05-27 05:50:39 +02:00
|
|
|
NULL, /* notify/listen */
|
|
|
|
NULL /* pgstat */
|
2005-06-18 00:32:51 +02:00
|
|
|
};
|
|
|
|
|
2005-10-15 04:49:52 +02:00
|
|
|
const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
2005-06-18 00:32:51 +02:00
|
|
|
{
|
2005-10-15 04:49:52 +02:00
|
|
|
NULL, /* END ID */
|
|
|
|
lock_twophase_postcommit, /* Lock */
|
|
|
|
inval_twophase_postcommit, /* Inval */
|
|
|
|
flatfile_twophase_postcommit, /* flat file update */
|
2007-11-15 22:14:46 +01:00
|
|
|
notify_twophase_postcommit, /* notify/listen */
|
2007-05-27 05:50:39 +02:00
|
|
|
pgstat_twophase_postcommit /* pgstat */
|
2005-06-18 00:32:51 +02:00
|
|
|
};
|
|
|
|
|
2005-10-15 04:49:52 +02:00
|
|
|
const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
|
2005-06-18 00:32:51 +02:00
|
|
|
{
|
2005-10-15 04:49:52 +02:00
|
|
|
NULL, /* END ID */
|
|
|
|
lock_twophase_postabort, /* Lock */
|
|
|
|
NULL, /* Inval */
|
|
|
|
NULL, /* flat file update */
|
2007-05-27 05:50:39 +02:00
|
|
|
NULL, /* notify/listen */
|
|
|
|
pgstat_twophase_postabort /* pgstat */
|
2005-06-18 00:32:51 +02:00
|
|
|
};
|