]> granicus.if.org Git - postgresql/blob - src/backend/access/transam/twophase_rmgr.c
Fix up pgstats counting of live and dead tuples to recognize that committed
[postgresql] / src / backend / access / transam / twophase_rmgr.c
1 /*-------------------------------------------------------------------------
2  *
3  * twophase_rmgr.c
4  *        Two-phase-commit resource managers tables
5  *
6  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  *
10  * IDENTIFICATION
11  *        $PostgreSQL: pgsql/src/backend/access/transam/twophase_rmgr.c,v 1.5 2007/05/27 03:50:39 tgl Exp $
12  *
13  *-------------------------------------------------------------------------
14  */
15 #include "postgres.h"
16
17 #include "access/twophase_rmgr.h"
18 #include "commands/async.h"
19 #include "pgstat.h"
20 #include "storage/lock.h"
21 #include "utils/flatfiles.h"
22 #include "utils/inval.h"
23
24
25 const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
26 {
27         NULL,                                           /* END ID */
28         lock_twophase_recover,          /* Lock */
29         NULL,                                           /* Inval */
30         NULL,                                           /* flat file update */
31         NULL,                                           /* notify/listen */
32         NULL                                            /* pgstat */
33 };
34
35 const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
36 {
37         NULL,                                           /* END ID */
38         lock_twophase_postcommit,       /* Lock */
39         inval_twophase_postcommit,      /* Inval */
40         flatfile_twophase_postcommit,           /* flat file update */
41         notify_twophase_postcommit,     /* notify/listen */
42         pgstat_twophase_postcommit      /* pgstat */
43 };
44
45 const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
46 {
47         NULL,                                           /* END ID */
48         lock_twophase_postabort,        /* Lock */
49         NULL,                                           /* Inval */
50         NULL,                                           /* flat file update */
51         NULL,                                           /* notify/listen */
52         pgstat_twophase_postabort       /* pgstat */
53 };