diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-17 22:32:51 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-17 22:32:51 +0000 |
commit | d0a89683a3a4dd8e76ef0a99101355999e519df5 (patch) | |
tree | b19aaf7f03cbcc851b00ca6e472cc7d3e5a20ca1 /src/backend/access/transam/twophase_rmgr.c | |
parent | 5495575903e35ceb40d32055ab55e9377460208f (diff) | |
download | postgresql-d0a89683a3a4dd8e76ef0a99101355999e519df5.tar.gz postgresql-d0a89683a3a4dd8e76ef0a99101355999e519df5.zip |
Two-phase commit. Original patch by Heikki Linnakangas, with additional
hacking by Alvaro Herrera and Tom Lane.
Diffstat (limited to 'src/backend/access/transam/twophase_rmgr.c')
-rw-r--r-- | src/backend/access/transam/twophase_rmgr.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/backend/access/transam/twophase_rmgr.c b/src/backend/access/transam/twophase_rmgr.c new file mode 100644 index 00000000000..e78f8b2fbb3 --- /dev/null +++ b/src/backend/access/transam/twophase_rmgr.c @@ -0,0 +1,49 @@ +/*------------------------------------------------------------------------- + * + * twophase_rmgr.c + * Two-phase-commit resource managers tables + * + * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * + * IDENTIFICATION + * $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.1 2005/06/17 22:32:42 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#include "postgres.h" + +#include "access/twophase_rmgr.h" +#include "commands/async.h" +#include "storage/lock.h" +#include "utils/flatfiles.h" +#include "utils/inval.h" + + +const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] = +{ + NULL, /* END ID */ + lock_twophase_recover, /* Lock */ + NULL, /* Inval */ + NULL, /* flat file update */ + NULL /* notify/listen */ +}; + +const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] = +{ + NULL, /* END ID */ + lock_twophase_postcommit, /* Lock */ + inval_twophase_postcommit, /* Inval */ + flatfile_twophase_postcommit, /* flat file update */ + notify_twophase_postcommit /* notify/listen */ +}; + +const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] = +{ + NULL, /* END ID */ + lock_twophase_postabort, /* Lock */ + NULL, /* Inval */ + NULL, /* flat file update */ + NULL /* notify/listen */ +}; |