File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -227,17 +227,17 @@ static void gen_snapshot(Transaction *t) {
227
227
228
228
static xid_t get_global_xmin () {
229
229
int i , j ;
230
- xid_t xmin = MAX_XID ;
230
+ xid_t xmin = INVALID_XID ;
231
231
Transaction * t ;
232
232
for (i = 0 ; i < transactions_count ; i ++ ) {
233
233
t = transactions + i ;
234
- j = t -> snapshots_count > MAX_SNAPSHOTS_PER_TRANS ? MAX_SNAPSHOTS_PER_TRANS : t -> snapshots_count ;
235
- while (-- j >= 0 ) {
236
- Snapshot * s = transaction_snapshot (t , j );
237
- if (s -> xmin < xmin ) {
238
- xmin = s -> xmin ;
239
- }
240
- // minor TODO: Use 'times_sent' to generate a bit greater xmin?
234
+ j = t -> snapshots_count > MAX_SNAPSHOTS_PER_TRANS ? MAX_SNAPSHOTS_PER_TRANS : t -> snapshots_count ;
235
+ while (-- j >= 0 ) {
236
+ Snapshot * s = transaction_snapshot (t , j );
237
+ if (( xmin == INVALID_XID ) || (s -> xmin < xmin ) ) {
238
+ xmin = s -> xmin ;
239
+ }
240
+ // minor TODO: Use 'times_sent' to generate a bit greater xmin?
241
241
}
242
242
}
243
243
return xmin ;
You can’t perform that action at this time.
0 commit comments