grafana / xk6-output-timescaledb

k6 extension to output real-time test metrics to TimescaleDB.
Apache License 2.0
29 stars 14 forks source link

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

Closed micsjo closed 1 year ago

micsjo commented 1 year ago

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.

micsjo commented 1 year ago

18 fixes the issue

javaducky commented 1 year ago

Fixed with #18.