@@ -114,9 +114,6 @@ static void ActivateCommitTs(void);
114
114
static void DeactivateCommitTs (void );
115
115
static void WriteZeroPageXlogRec (int pageno );
116
116
static void WriteTruncateXlogRec (int pageno , TransactionId oldestXid );
117
- static void WriteSetTimestampXlogRec (TransactionId mainxid , int nsubxids ,
118
- TransactionId * subxids , TimestampTz timestamp ,
119
- RepOriginId nodeid );
120
117
121
118
/*
122
119
* TransactionTreeSetCommitTsData
@@ -133,18 +130,11 @@ static void WriteSetTimestampXlogRec(TransactionId mainxid, int nsubxids,
133
130
* permanent) so we need to keep the information about them here. If the
134
131
* subtrans implementation changes in the future, we might want to revisit the
135
132
* decision of storing timestamp info for each subxid.
136
- *
137
- * The write_xlog parameter tells us whether to include an XLog record of this
138
- * or not. Normally, this is called from transaction commit routines (both
139
- * normal and prepared) and the information will be stored in the transaction
140
- * commit XLog record, and so they should pass "false" for this. The XLog redo
141
- * code should use "false" here as well. Other callers probably want to pass
142
- * true, so that the given values persist in case of crashes.
143
133
*/
144
134
void
145
135
TransactionTreeSetCommitTsData (TransactionId xid , int nsubxids ,
146
136
TransactionId * subxids , TimestampTz timestamp ,
147
- RepOriginId nodeid , bool write_xlog )
137
+ RepOriginId nodeid )
148
138
{
149
139
int i ;
150
140
TransactionId headxid ;
@@ -161,13 +151,6 @@ TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
161
151
if (!commitTsShared -> commitTsActive )
162
152
return ;
163
153
164
- /*
165
- * Comply with the WAL-before-data rule: if caller specified it wants this
166
- * value to be recorded in WAL, do so before touching the data.
167
- */
168
- if (write_xlog )
169
- WriteSetTimestampXlogRec (xid , nsubxids , subxids , timestamp , nodeid );
170
-
171
154
/*
172
155
* Figure out the latest Xid in this batch: either the last subxid if
173
156
* there's any, otherwise the parent xid.
@@ -993,28 +976,6 @@ WriteTruncateXlogRec(int pageno, TransactionId oldestXid)
993
976
(void ) XLogInsert (RM_COMMIT_TS_ID , COMMIT_TS_TRUNCATE );
994
977
}
995
978
996
- /*
997
- * Write a SETTS xlog record
998
- */
999
- static void
1000
- WriteSetTimestampXlogRec (TransactionId mainxid , int nsubxids ,
1001
- TransactionId * subxids , TimestampTz timestamp ,
1002
- RepOriginId nodeid )
1003
- {
1004
- xl_commit_ts_set record ;
1005
-
1006
- record .timestamp = timestamp ;
1007
- record .nodeid = nodeid ;
1008
- record .mainxid = mainxid ;
1009
-
1010
- XLogBeginInsert ();
1011
- XLogRegisterData ((char * ) & record ,
1012
- offsetof(xl_commit_ts_set , mainxid ) +
1013
- sizeof (TransactionId ));
1014
- XLogRegisterData ((char * ) subxids , nsubxids * sizeof (TransactionId ));
1015
- XLogInsert (RM_COMMIT_TS_ID , COMMIT_TS_SETTS );
1016
- }
1017
-
1018
979
/*
1019
980
* CommitTS resource manager's routines
1020
981
*/
@@ -1055,29 +1016,6 @@ commit_ts_redo(XLogReaderState *record)
1055
1016
1056
1017
SimpleLruTruncate (CommitTsCtl , trunc -> pageno );
1057
1018
}
1058
- else if (info == COMMIT_TS_SETTS )
1059
- {
1060
- xl_commit_ts_set * setts = (xl_commit_ts_set * ) XLogRecGetData (record );
1061
- int nsubxids ;
1062
- TransactionId * subxids ;
1063
-
1064
- nsubxids = ((XLogRecGetDataLen (record ) - SizeOfCommitTsSet ) /
1065
- sizeof (TransactionId ));
1066
- if (nsubxids > 0 )
1067
- {
1068
- subxids = palloc (sizeof (TransactionId ) * nsubxids );
1069
- memcpy (subxids ,
1070
- XLogRecGetData (record ) + SizeOfCommitTsSet ,
1071
- sizeof (TransactionId ) * nsubxids );
1072
- }
1073
- else
1074
- subxids = NULL ;
1075
-
1076
- TransactionTreeSetCommitTsData (setts -> mainxid , nsubxids , subxids ,
1077
- setts -> timestamp , setts -> nodeid , false);
1078
- if (subxids )
1079
- pfree (subxids );
1080
- }
1081
1019
else
1082
1020
elog (PANIC , "commit_ts_redo: unknown op code %u" , info );
1083
1021
}
0 commit comments