grafana/xk6-output-timescaledb

Batch writing to postgresql (timescale) with pgx isn't really a batch write to the db

Closed this issue · 2 comments

Using batch from pgx doesn't write the data to the db in a batch write.

In effect it just piles all the inserts in a a big package (the "batch") and sends the big package in one go.

The db then commences to do all the inserts in one transaction but in sequence. If the sequence of inserts takes too much time, the connection will be severed and the fail ignored by pgx.

Batches are very limited in capacity for high volume use cases and need a better implementation.

#18 fixes the issue

Fixed with #18.