Skip to content

Commit 14d6ed8

Browse files
committed
Change DtmAdjustOldestXid
1 parent ddfe0c0 commit 14d6ed8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

contrib/pg_tsdtm/pg_dtm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ static TransactionId DtmAdjustOldestXid(TransactionId xid)
393393
DtmTransStatus *ts, *prev = NULL;
394394
timestamp_t cutoff_time = dtm_get_current_time() - DtmVacuumDelay*USEC;
395395
SpinLockAcquire(&local->lock);
396+
ts = (DtmTransStatus*)hash_search(xid2status, &xid, HASH_FIND, NULL);
397+
if (ts != NULL) {
398+
cutoff_time = ts->cid - DtmVacuumDelay*USEC;
399+
}
396400
for (ts = local->trans_list_head; ts != NULL && ts->cid < cutoff_time; prev = ts, ts = ts->next) {
397401
if (prev != NULL) {
398402
hash_search(xid2status, &prev->xid, HASH_REMOVE, NULL);

contrib/pg_tsdtm/tests/transfers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
)
1111

1212
const (
13-
TRANSFER_CONNECTIONS = 100
13+
TRANSFER_CONNECTIONS = 10
1414
INIT_AMOUNT = 10000
15-
N_ITERATIONS = 1000
15+
N_ITERATIONS = 10000
1616
N_ACCOUNTS = 100000
1717
)
1818

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy