SQLite extension to synchronize data using PostgreSQL logical replication
github.com·4h·
Discuss: Hacker News
Flag this post

SQLite extension to replicate data from PostgreSQL

Installation

Download postgresql extension from the releases page. Here’s a great article that explains how to install the SQLite extension.

Compiling from source

  • Go 1.24+ and CGO_ENABLED=1 is required.
go build -ldflags="-s -w" -buildmode=c-shared -o postgresql.so
  • Use .so extension for Linux, .dylib for MacOS and .dll for Windows

Basic usage

Prepare PostgreSQL

1. Modify postgresql.conf:

  • Set wal_level = logical.
  • Adjust max_replication_slots and max_wal_senders according to the number of subscribers and replication slots needed.

2. Modify pg_hba.co…

Similar Posts

Loading similar posts...