B
B
bodrich2020-06-10 14:01:45
PostgreSQL
bodrich, 2020-06-10 14:01:45

Is it possible to correctly receive the results of several queries simultaneously in one transaction?

The bottom line is this: there are a bunch of goroutines in which something like tx.Stmtx(request).QueryRow(values...).Scan(&result), tx is a common variable for all goroutines, and the problem is that sometimes it starts to appear "unexpected Bind response 'D'" error, is there a way to get rid of it? (except for the obvious case with a transaction mutex)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WinPooh32, 2020-06-10
@WinPooh32

package main

func main() {
        runtime.GOMAXPROCS(1)
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question