SSI patch renumbered existing 2PC resource managers??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, drkp(at)csail(dot)mit(dot)edu
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: SSI patch renumbered existing 2PC resource managers??
Date: 2011-06-13 18:31:23
Message-ID: 5362.1307989883@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So I finally started actually reading the SSI changes, and I am a tad
distressed by this:

diff --git a/src/include/access/twophase_rmgr.h b/src/include/access/twophase_rmgr.h
index a541d0f..1c7d8bb 100644
--- a/src/include/access/twophase_rmgr.h
+++ b/src/include/access/twophase_rmgr.h
@@ -23,8 +23,9 @@ typedef uint8 TwoPhaseRmgrId;
*/
#define TWOPHASE_RM_END_ID 0
#define TWOPHASE_RM_LOCK_ID 1
-#define TWOPHASE_RM_PGSTAT_ID 2
-#define TWOPHASE_RM_MULTIXACT_ID 3
+#define TWOPHASE_RM_PREDICATELOCK_ID 2
+#define TWOPHASE_RM_PGSTAT_ID 3
+#define TWOPHASE_RM_MULTIXACT_ID 4
#define TWOPHASE_RM_MAX_ID TWOPHASE_RM_MULTIXACT_ID

extern const TwoPhaseCallback twophase_recover_callbacks[];

What was the rationale for changing the assignments of existing 2PC IDs?
So far as I can tell, that breaks pg_upgrade (if there are any open
prepared transactions) for no redeeming social benefit. Is there a
reason why TWOPHASE_RM_PREDICATELOCK_ID has to be 2 and not at the end?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2011-06-13 18:33:55 Re: [v9.2] SECURITY LABEL on shared database object
Previous Message Robert Haas 2011-06-13 18:29:05 Re: Reminder: 1.5 days to 9.2 CF1