Categorygithub.com/rilldata/duckdb-replicator
modulepackage
0.0.0-20241105125325-4015bc69dfa9
Repository: https://github.com/rilldata/duckdb-replicator.git
Documentation: pkg.go.dev

# README

DuckDB Replicator

Motivation

  1. As an embedded database, DuckDB does not inherently provide the same isolation for ETL and serving workloads that other OLAP databases offer.
  2. We have observed significant degradation in query performance during data ingestion.
  3. In a Kubernetes environment, it is recommended to use local disks instead of network disks, necessitating separate local disk backups.

Features

  1. Utilizes separate DuckDB handles for reading and writing, each with distinct CPU and memory resources.
  2. Automatically backs up writes to GCS in real-time.
  3. Automatically restores from backups when starting with an empty local disk.

Examples

  1. Refer to examples/main.go for a usage example.

Future Work

  1. Enable writes and reads to be executed on separate machines.
  2. Limit read operations to specific tables to support ephemeral tables (intermediate tables required only for writes).

# Packages

No description provided by the author

# Functions

NewDB creates a new DB instance.
NewGCSBackupProvider creates a new BackupProvider based on GCS.
NewSingleDB creates a new DB that writes to and reads from a single DuckDB database.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Conn represents a single database connection.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author