1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * twophase_rmgr.c |
4 | * Two-phase-commit resource managers tables |
5 | * |
6 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
7 | * Portions Copyright (c) 1994, Regents of the University of California |
8 | * |
9 | * |
10 | * IDENTIFICATION |
11 | * src/backend/access/transam/twophase_rmgr.c |
12 | * |
13 | *------------------------------------------------------------------------- |
14 | */ |
15 | #include "postgres.h" |
16 | |
17 | #include "access/multixact.h" |
18 | #include "access/twophase_rmgr.h" |
19 | #include "pgstat.h" |
20 | #include "storage/lock.h" |
21 | #include "storage/predicate.h" |
22 | |
23 | |
24 | const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] = |
25 | { |
26 | NULL, /* END ID */ |
27 | lock_twophase_recover, /* Lock */ |
28 | NULL, /* pgstat */ |
29 | multixact_twophase_recover, /* MultiXact */ |
30 | predicatelock_twophase_recover /* PredicateLock */ |
31 | }; |
32 | |
33 | const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] = |
34 | { |
35 | NULL, /* END ID */ |
36 | lock_twophase_postcommit, /* Lock */ |
37 | pgstat_twophase_postcommit, /* pgstat */ |
38 | multixact_twophase_postcommit, /* MultiXact */ |
39 | NULL /* PredicateLock */ |
40 | }; |
41 | |
42 | const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] = |
43 | { |
44 | NULL, /* END ID */ |
45 | lock_twophase_postabort, /* Lock */ |
46 | pgstat_twophase_postabort, /* pgstat */ |
47 | multixact_twophase_postabort, /* MultiXact */ |
48 | NULL /* PredicateLock */ |
49 | }; |
50 | |
51 | const TwoPhaseCallback twophase_standby_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] = |
52 | { |
53 | NULL, /* END ID */ |
54 | lock_twophase_standby_recover, /* Lock */ |
55 | NULL, /* pgstat */ |
56 | NULL, /* MultiXact */ |
57 | NULL /* PredicateLock */ |
58 | }; |
59 | |