Skip to content

Commit 2e74d35

Browse files
committed
Merge branch 'master' of github.com:postgrespro/postgres_cluster
2 parents 746b5ff + 9497fc6 commit 2e74d35

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

contrib/multimaster/dtmd/src/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static void gen_snapshot(Snapshot *s) {
195195
Transaction* t;
196196
int n = 0;
197197
s->times_sent = 0;
198+
#if 0
198199
for (t = (Transaction*)active_transactions.prev; t != (Transaction*)&active_transactions; t = (Transaction*)t->elem.prev) {
199200
/*
200201
if (t->xid < s->xmin) {
@@ -206,6 +207,13 @@ static void gen_snapshot(Snapshot *s) {
206207
*/
207208
s->active[n++] = t->xid;
208209
}
210+
#else
211+
if (!l2_list_is_empty(&active_transactions)) {
212+
s->active[0] = ((Transaction*)active_transactions.prev)->xid;
213+
s->active[1] = ((Transaction*)active_transactions.next)->xid;
214+
n = 2;
215+
}
216+
#endif
209217
s->nactive = n;
210218
if (n > 0) {
211219
s->xmin = s->active[0];

contrib/multimaster/tests/dtmbench.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ int main (int argc, char* argv[])
231231
if (initialize) {
232232
initializeDatabase();
233233
printf("%d accounts inserted\n", cfg.nAccounts);
234+
return 0;
234235
}
235236

236237
time_t start = getCurrentTime();

0 commit comments

Comments
 (0)