ERROR: A document with the same primary key exists already (SQLSTATE 23505)

Using CrateDB with the adapter for Prometheus metric LTS. The table has been created as follows:

CREATE TABLE "metrics" (
    "timestamp" TIMESTAMP,
    "labels_hash" STRING,
    "labels" OBJECT(DYNAMIC),
    "value" DOUBLE,
    "valueRaw" LONG,
    "day__generated" TIMESTAMP GENERATED ALWAYS AS date_trunc('day', "timestamp"),
    PRIMARY KEY ("timestamp", "labels_hash", "day__generated")
  ) PARTITIONED BY ("day__generated")
WITH (codec = 'best_compression');

However, duplicate primary key errors are produced. What are we missing here? Looks like they should be unique.

Hi,
Could you share what version of Prometheus you are running and how you configured the remote_write?

Hi, the versions are:

Prometheus - 2.36.2
CrateDB Prometheus Adapter - 0.5.1
CrateDB version - 5.7.1-1

Remote-write has been configured as:

remote_write: