Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae07620

Browse files
committed
Merge branch 'master' of github.com:postgrespro/pg_tsdtm
2 parents062a09c +a7f9674 commitae07620

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎pg_dtm.c‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ static HTAB* xid2status;
7474
staticHTAB*gtid2xid;
7575
staticDtmNodeState*local;
7676
staticDtmTransStatedtm_tx;
77-
statictimestamp_tfirstReportTime;
78-
statictimestamp_tprevReportTime;
79-
statictimestamp_ttotalSleepTime;
8077
staticuint64totalSleepInterrupts;
8178
staticintDtmVacuumDelay;
8279

@@ -144,6 +141,9 @@ static cid_t dtm_sync(cid_t global_cid)
144141
#ifTRACE_SLEEP_TIME
145142
{
146143
timestamp_tnow=dtm_get_current_time();
144+
statictimestamp_tfirstReportTime;
145+
statictimestamp_tprevReportTime;
146+
statictimestamp_ttotalSleepTime;
147147
#endif
148148
dtm_sleep(global_cid-local_cid);
149149
#ifTRACE_SLEEP_TIME
@@ -153,7 +153,7 @@ static cid_t dtm_sync(cid_t global_cid)
153153
if (firstReportTime==0) {
154154
firstReportTime=now;
155155
}else {
156-
fprintf(stderr,"Sleep %lu of %lu usec (%f%%)\n",totalSleepTime,now-firstReportTime,totalSleepTime*100.0/(now-firstReportTime));
156+
fprintf(stderr,"Sync sleep %lu of %lu usec (%f%%)\n",totalSleepTime,now-firstReportTime,totalSleepTime*100.0/(now-firstReportTime));
157157
}
158158
}
159159
}
@@ -405,8 +405,9 @@ static TransactionId DtmAdjustOldestXid(TransactionId xid)
405405
}
406406
}
407407
if (prev!=NULL) {
408+
*(int*)0=0;
408409
local->trans_list_head=prev;
409-
xid=prev->xid;
410+
xid=prev->xid;
410411
}else {
411412
xid=FirstNormalTransactionId;
412413
}
@@ -454,6 +455,9 @@ bool DtmXidInMVCCSnapshot(TransactionId xid, Snapshot snapshot)
454455
#ifTRACE_SLEEP_TIME
455456
{
456457
timestamp_tnow=dtm_get_current_time();
458+
statictimestamp_tfirstReportTime;
459+
statictimestamp_tprevReportTime;
460+
statictimestamp_ttotalSleepTime;
457461
#endif
458462
dtm_sleep(delay);
459463
#ifTRACE_SLEEP_TIME
@@ -463,7 +467,7 @@ bool DtmXidInMVCCSnapshot(TransactionId xid, Snapshot snapshot)
463467
if (firstReportTime==0) {
464468
firstReportTime=now;
465469
}else {
466-
fprintf(stderr,"Sleep %lu of %lu usec (%f%%)\n",totalSleepTime,now-firstReportTime,totalSleepTime*100.0/(now-firstReportTime));
470+
fprintf(stderr,"Snapshot sleep %lu of %lu usec (%f%%)\n",totalSleepTime,now-firstReportTime,totalSleepTime*100.0/(now-firstReportTime));
467471
}
468472
}
469473
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp