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

Commit7c4ccc1

Browse files
knizhnikkelvich
authored andcommitted
Fix Copy statement
1 parent5dd394c commit7c4ccc1

File tree

3 files changed

+63
-3
lines changed

3 files changed

+63
-3
lines changed

‎multimaster.c

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ MtmAdjustOldestXid(TransactionId xid)
518518
}
519519
}
520520
}
521-
if (MtmUseDtm) {
521+
//if (MtmUseDtm)
522+
{
522523
if (prev!=NULL) {
523524
Mtm->transListHead=prev;
524525
Mtm->oldestXid=xid=prev->xid;
@@ -2568,7 +2569,6 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
25682569
caseT_AlterTableSpaceOptionsStmt:
25692570
caseT_TruncateStmt:
25702571
caseT_CommentStmt:/* XXX: we could replicate these */;
2571-
caseT_CopyStmt:
25722572
caseT_PrepareStmt:
25732573
caseT_ExecuteStmt:
25742574
caseT_DeallocateStmt:
@@ -2676,6 +2676,29 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
26762676
}
26772677
}
26782678
break;
2679+
caseT_CopyStmt:
2680+
{
2681+
CopyStmt*copyStatement= (CopyStmt*)parsetree;
2682+
skipCommand= true;
2683+
if (copyStatement->is_from) {
2684+
RangeVar*relation=copyStatement->relation;
2685+
2686+
if (relation!=NULL)
2687+
{
2688+
Oidrelid=RangeVarGetRelid(relation,NoLock, true);
2689+
if (OidIsValid(relid))
2690+
{
2691+
Relationrel=heap_open(relid,ShareLock);
2692+
if (RelationNeedsWAL(rel)) {
2693+
MtmTx.containsDML= true;
2694+
}
2695+
heap_close(rel,ShareLock);
2696+
}
2697+
}
2698+
}
2699+
break;
2700+
}
2701+
26792702
default:
26802703
skipCommand= false;
26812704
break;

‎tests/deploy_layouts/cluster.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
-"multimaster.arbiter_port = 5600"
5656
-"multimaster.vacuum_delay = 1"
5757
-"multimaster.workers = 32"
58-
-"multimaster.use_dtm =0"
58+
-"multimaster.use_dtm =1"
5959

6060
-name:restart postgrespro
6161
command:"{{pg_dst}}/bin/pg_ctl restart -w -D {{pg_datadir}} -l {{pg_datadir}}/pg.log"

‎tests/perf.results

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,40 @@ Bench finished at Чт. апр. 14 20:14:21 MSK 2016
291291
Bench started at Чт. апр. 14 20:14:46 MSK 2016
292292
astro5:{tps:11453.993709, transactions:1500000, selects:0, updates:3001960, aborts:2563, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
293293
Bench finished at Чт. апр. 14 20:16:57 MSK 2016
294+
Bench started at Чт. апр. 14 20:22:40 MSK 2016
295+
Bench started at Пт. апр. 15 09:59:02 MSK 2016
296+
astro5:{tps:19157.887469, transactions:1500000, selects:0, updates:3001900, aborts:2466, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
297+
Bench finished at Пт. апр. 15 10:00:20 MSK 2016
298+
Bench started at Пт. апр. 15 10:00:47 MSK 2016
299+
astro5:{tps:19393.531934, transactions:1500000, selects:0, updates:3001854, aborts:2486, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
300+
Bench finished at Пт. апр. 15 10:02:04 MSK 2016
301+
Bench started at Пт. апр. 15 10:17:23 MSK 2016
302+
astro5:{tps:20665.868900, transactions:1500000, selects:0, updates:3001838, aborts:2422, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
303+
Bench finished at Пт. апр. 15 10:18:36 MSK 2016
304+
Bench started at Пт. апр. 15 10:21:50 MSK 2016
305+
astro5:{tps:18643.610238, transactions:1500000, selects:0, updates:3001856, aborts:2431, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
306+
Bench finished at Пт. апр. 15 10:23:11 MSK 2016
307+
Bench started at Пт. апр. 15 10:52:34 MSK 2016
308+
astro5:{tps:20520.642631, transactions:1500000, selects:0, updates:3001844, aborts:2421, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
309+
Bench finished at Пт. апр. 15 10:53:48 MSK 2016
310+
Bench started at Пт. апр. 15 11:06:54 MSK 2016
311+
astro5:{tps:20158.824931, transactions:1500000, selects:0, updates:3001700, aborts:2392, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
312+
Bench finished at Пт. апр. 15 11:08:10 MSK 2016
313+
Bench started at Пт. апр. 15 11:31:49 MSK 2016
314+
astro5:{tps:18980.574597, transactions:1000000, selects:0, updates:2000698, aborts:1019, abort_percent: 0, readers:0, writers:100, update_percent:100, accounts:500000, iterations:10000, hosts:3}
315+
Bench finished at Пт. апр. 15 11:32:42 MSK 2016
316+
Bench started at Пт. апр. 15 11:33:11 MSK 2016
317+
astro5:{tps:19746.702465, transactions:1500000, selects:0, updates:3001724, aborts:2315, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
318+
Bench finished at Пт. апр. 15 11:34:27 MSK 2016
319+
Bench started at Пт. апр. 15 11:52:43 MSK 2016
320+
astro5:{tps:20725.160946, transactions:1500000, selects:0, updates:3001710, aborts:2348, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
321+
Bench finished at Пт. апр. 15 11:53:55 MSK 2016
322+
Bench started at Пт. апр. 15 11:55:32 MSK 2016
323+
astro5:{tps:64193.925226, transactions:1500000, selects:3000000, updates:0, aborts:0, abort_percent: 0, readers:0, writers:150, update_percent:0, accounts:500000, iterations:10000, hosts:1}
324+
Bench finished at Пт. апр. 15 11:55:56 MSK 2016
325+
Bench started at Пт. апр. 15 11:56:33 MSK 2016
326+
astro5:{tps:124840.952626, transactions:1500000, selects:3000000, updates:0, aborts:0, abort_percent: 0, readers:0, writers:150, update_percent:0, accounts:500000, iterations:10000, hosts:3}
327+
Bench finished at Пт. апр. 15 11:56:45 MSK 2016
328+
Bench started at Пт. апр. 15 18:41:39 MSK 2016
329+
astro5:{tps:17367.895646, transactions:1500000, selects:0, updates:3002062, aborts:1968, abort_percent: 0, readers:0, writers:150, update_percent:100, accounts:500000, iterations:10000, hosts:3}
330+
Bench finished at Пт. апр. 15 18:43:05 MSK 2016

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp