Skip to content

Commit 9b75502

Browse files
committed
Update daemons.go for testing.
1 parent 702af19 commit 9b75502

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

contrib/pg_xtm/tests/daemons.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,13 @@ func initdb(bin string, datadir string) {
8585
}
8686
}
8787

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+
}
9095
name := "postgres " + datadir
9196
c := make(chan string)
9297

@@ -112,7 +117,7 @@ func check_bin(bin *map[string]string) {
112117

113118
func main() {
114119
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",
116121
"initdb": "/home/kvap/postgrespro-build/bin/initdb",
117122
"postgres": "/home/kvap/postgrespro-build/bin/postgres",
118123
}
@@ -132,7 +137,7 @@ func main() {
132137

133138
for i, datadir := range datadirs {
134139
wg.Add(1)
135-
go postgres(bin["postgres"], datadir, 5432 + i, &wg)
140+
go postgres(bin["postgres"], datadir, 5432 + i, i, &wg)
136141
}
137142

138143
wg.Wait()

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