Skip to content

Building v1.4: Bulk Writes over PostgreSQL COPY & a Native PromQL Engine | Greptime Monthly Report - No. 90

November went into v1.4: PostgreSQL COPY FROM STDIN for bulk writes, an opt-in native PromQL engine, fulltext indexes on JSON2 nested fields, exemplar storage, and security, correctness and performance fixes. v1.3.1 and v1.3.2 shipped as maintenance releases.
Building v1.4: Bulk Writes over PostgreSQL COPY & a Native PromQL Engine | Greptime Monthly Report - No. 90
On this page

Summary ​

November 2026 · 2026-11-01 – 2026-11-30

Most of November went into v1.4, and v1.3 got two maintenance releases, v1.3.1 and v1.3.2. What landed this month:

  • PostgreSQL COPY adds JSONL, Arrow, OTLP and Remote Write formats.
  • A native PromQL engine, much faster in our tests and open for testing.
  • JSON2 nested-field indexes, exemplar storage, security and performance fixes.

v1.4 Development ​

The following changes merged to main and will ship in v1.4. They are in the nightly builds.

Bulk writes over PostgreSQL COPY ​

October added CSV and InfluxDB line protocol to PostgreSQL COPY FROM STDIN. This month adds JSONL, Arrow IPC, OTLP and Prometheus Remote Write, so a PostgreSQL client can bulk-load tables and send metrics, logs and traces. Writes use the session's user and database. The COPY FROM STDIN documentation covers each format and its options.

sql
-- Newline-delimited JSON objects, keys matched to column names
COPY readings FROM STDIN WITH (FORMAT jsonl);

-- An Arrow IPC stream, written through the Arrow Flight bulk path
COPY readings FROM STDIN WITH (FORMAT arrow);

-- One OTLP protobuf message; signal is 'metrics' (default), 'logs' or 'traces'
COPY FROM STDIN WITH (FORMAT otlp);
COPY app_logs FROM STDIN WITH (FORMAT otlp, signal 'logs');

-- One compressed Prometheus Remote Write request body
COPY FROM STDIN WITH (FORMAT promwrite, version 2);

In an ingestion benchmark against a release build of main, COPY with Arrow IPC wrote 2.53 million points/s, 11% more than gRPC Arrow Flight bulk ingestion. JSONL reached 1.12 million and CSV 0.96 million points/s, against about 51,000 for PostgreSQL INSERT. The test ran a standalone server and a Go client on one machine, with 200,000 rows in 1,000-row batches and 4 concurrent writers.

WriterPoints/sBatch p95 (ms)
COPY Arrow IPC2,525,2332.2
gRPC Bulk (Arrow Flight)2,265,3442.3
COPY JSONL1,119,5625.1
COPY CSV962,5405.8
COPY InfluxDB line protocol785,2467.0
PostgreSQL INSERT51,25890.6

A native PromQL engine ​

The current engine runs PromQL as a DataFusion plan. The new engine reads raw series and keeps them in series form through range functions, aggregation and native histogram evaluation (db#10480). In our tests it is much faster than the current engine. It is still being refined; stay tuned for the numbers.

The engine is off by default. To test it, set query.experimental_native_promql = true in the frontend or standalone configuration, or run SET query.experimental_native_promql = true in a session. Try it with your own queries, and report wrong results or slow queries on GitHub Issues.

Indexes on JSON2 nested fields ​

JSON2 type hints can declare an index on each nested path. October added INVERTED INDEX and SKIPPING INDEX; this month adds FULLTEXT INDEX with the bloom or tantivy backend, used by matches, matches_term and eligible LIKE filters (db#10064). A query filtering on an indexed path prunes SSTs instead of scanning the whole JSON column.

sql
CREATE TABLE logs (
    ts TIMESTAMP TIME INDEX,
    attrs JSON2 (
        service.name STRING INVERTED INDEX,
        status BIGINT SKIPPING INDEX,
        message STRING FULLTEXT INDEX WITH (backend = 'bloom')
    )
) WITH ('append_mode' = 'true');

SELECT * FROM logs WHERE matches_term(attrs.message, 'timeout');

See full-text indexes on subpaths for the syntax and options.

Exemplars ​

Exemplars sent with Prometheus Remote Write v1 or v2 and with OTLP metrics are stored, and /v1/prometheus/api/v1/query_exemplars returns them in the Prometheus exemplar API format (db#9922, db#9923, db#9924). Each exemplar keeps its labels, such as trace_id, which link a metric sample to its trace.

Exemplars are stored in the greptime_metrics_exemplars table of each database. Grafana's Prometheus data source reads them from GreptimeDB as it does from Prometheus:

Grafana panel showing p99 latency with exemplars stored in GreptimeDB
Exemplars on a p99 latency panel, read from GreptimeDB through the Prometheus data source

Security, correctness and performance ​

  • Security: most of this month's hardening also shipped in v1.3.1 and v1.3.2 (see Maintaining v1.3). On main, COPY ... TO also rejects unsafe local file names (db#10462).
  • Performance: distributed queries push column projections down to datanodes (db#10221). Filtered TopK queries fill their heaps earlier (db#10515), scans skip SST files by primary key range before reading their footers (db#10564), and SST metadata uses less memory (db#10356). From the community, filters on date_bin(...) of the time index prune by time range, which speeds up views that bucket data for Grafana (db#10345).
  • Operations: information_schema.compaction_tasks lists running compaction tasks and ADMIN cancel_region_compaction cancels one (db#10173, db#10229). Automatic compaction shares its slots across regions, so one region with a large backlog no longer starves the rest (db#9947). Before maintenance, POST /admin/datanode/drain on metasrv moves a datanode's leader regions elsewhere (db#10083).

Maintaining v1.3 ​

Two maintenance releases shipped for v1.3. Both upgrade in place; we recommend that v1.3 users upgrade to v1.3.2.

  • v1.3.1 (November 13) fixes cases where written data could be lost after a repartition rollback or datanode restart, and the periodic local WAL sync not reaching disk under the default configuration. Switching databases over HTTP, MySQL or PostgreSQL checks the user's access, admin functions require ADMIN privileges, and credentials no longer appear in diagnostic output, logs or table options. New tables from direct OTLP log ingestion use the greptime_log_v1 schema, with service_name in the primary key and a skipping index on trace_id.
  • v1.3.2 (November 30) fixes deleted rows reappearing on last_non_null tables, DELETE not removing rows on tables partitioned by a field column, precision loss in COPY FROM, and query failures on field values of 1 MiB or more. With user_provider configured, /debug/* endpoints require authentication.

Two changes can break existing clients. From v1.3.1, MySQL and PostgreSQL connections must use a database the user can access. From v1.3.2, scripts that call /debug/* must send credentials. The release posts list the other upgrade notes.

Ecosystem Updates ​

Contributors ​

Over the past month, 404 PRs from 33 contributors were merged. Among them, 21 community contributors contributed 38 PRs. Welcome to our new contributors: @dayan02dev, @shuxiachai, @florissmit10, @SAMARTHJAISWAL, @AbstractBike, @andrewmains12, @arpitjain099, @boaz2026, @g4lb, @luckysxx, @pcbeingused33, @vishalkotak, @zaidrain06!

Thanks to the community contributors who shipped this month:

Several v1.3.2 fixes came from community contributors: deleted rows reappearing on last_non_null tables (db#10717, db#10726), DELETE on tables partitioned by a field column (db#10710), lost precision in COPY FROM (db#10560), and column order after table reconciliation (db#10251).

Good First Issues ​

New to GreptimeDB? These are scoped for a first contribution. Comment on an issue to pick it up.

Issue#6621 Add config option to host on subpath ​

Add a config option so GreptimeDB can be served under a URL prefix such as /monitoring/greptimedb, without redirecting users to root-level paths.

Keywords: Configuration, HTTP, Dashboard

Difficulty: Medium

Issue#10737 Disallow non-NULL primary-key tag defaults in CREATE and ALTER TABLE for sparse Mito tables ​

On tables created with WITH ('primary_key_encoding'='sparse'), reject non-NULL defaults on primary-key (tag) columns in CREATE TABLE, ALTER TABLE ADD COLUMN and ALTER COLUMN ... SET DEFAULT. No default and DEFAULT NULL stay allowed. The issue explains why such defaults can produce rows with missing tag values.

Keywords: DDL, SQL validation, sparse primary key

Difficulty: Medium

Get Involved ​

Open an issue for bugs and feature requests, or drop into the community channel.

Stay in the loop

Join our community