@@ -85,8 +85,13 @@ func initdb(bin string, datadir string) {
85
85
}
86
86
}
87
87
88
- func postgres (bin string , datadir string , port int , wg * sync.WaitGroup ) {
89
- argv := []string {bin , "-D" , datadir , "-p" , strconv .Itoa (port )}
88
+ func postgres (bin string , datadir string , port int , nodeid int , wg * sync.WaitGroup ) {
89
+ argv := []string {
90
+ bin ,
91
+ "-D" , datadir ,
92
+ "-p" , strconv .Itoa (port ),
93
+ "-c" , "dtm.node_id=" + strconv .Itoa (nodeid ),
94
+ }
90
95
name := "postgres " + datadir
91
96
c := make (chan string )
92
97
@@ -112,7 +117,7 @@ func check_bin(bin *map[string]string) {
112
117
113
118
func main () {
114
119
bin := map [string ]string {
115
- "dtmd" : "/home/kvap/postgrespro/contrib/pg_dtm /dtmd/bin/dtmd" ,
120
+ "dtmd" : "/home/kvap/postgrespro/contrib/pg_xtm /dtmd/bin/dtmd" ,
116
121
"initdb" : "/home/kvap/postgrespro-build/bin/initdb" ,
117
122
"postgres" : "/home/kvap/postgrespro-build/bin/postgres" ,
118
123
}
@@ -132,7 +137,7 @@ func main() {
132
137
133
138
for i , datadir := range datadirs {
134
139
wg .Add (1 )
135
- go postgres (bin ["postgres" ], datadir , 5432 + i , & wg )
140
+ go postgres (bin ["postgres" ], datadir , 5432 + i , i , & wg )
136
141
}
137
142
138
143
wg .Wait ()
0 commit comments