Skip to content

Spike (deferred): local DuckLake catalog snapshot for low-latency read-only replicas #208

Open

Description

@jrosskopf

Context

A Cloud Run PoC measured ~2.5–3.0 s p50 per tool call with DuckLake on a Cloud SQL Postgres catalog (vs. 0.35 s in-memory). The floor came from sequential catalog round trips per query, not Parquet throughput.

Question

Can read-only replicas keep DuckLake's atomic snapshots without a per-query round trip? Candidate: the writer job (flapi cache refresh) uses a DuckDB-file catalog and uploads catalog-<snapshot>.ducklake + a CURRENT pointer; replicas download it at boot, attach READ_ONLY, poll the pointer, attach the new catalog under a fresh alias and swap once in-flight queries drain.

Measure (timebox 3 days)

  1. p50/p95 on a ~15M-row table: local catalog vs. Cloud SQL catalog vs. plain Parquet read in place;
  2. whether the alias swap is safe without a pool restart;
  3. catalog file size after 30 daily snapshots.

Status

Deferred until the consuming team's Phase 1 benchmark of direct Parquet reads. Run only if those miss their latency target or a team needs incremental merge on Cloud Run.

Activity

  1. added theissue type on Oct 31, 2026
  2. jrosskopf commented on Nov 21, 2026

    @jrosskopf
    ContributorAuthor

    Status: still deferred. The remote-VFS work (#231) added a bootstrap DuckDB that can read remote files before the main database exists, which a local DuckLake snapshot/replica spike could reuse. No code changes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions