{"repo":"jackc/pglogrepl","free":true,"listed":false,"github":"https://github.com/jackc/pglogrepl","clone":"git clone https://github.com/jackc/pglogrepl.git","description":"PostgreSQL logical replication library for Go.","language":"Go","stars":544,"topics":["golang","go","postgresql","replication"],"license":"MIT","category":"databases-storage","readme_excerpt":"pglogrepl pglogrepl is a Go package for PostgreSQL logical replication. pglogrepl uses package github.com/jackc/pgx/v5/pgconn as its underlying PostgreSQL connection. Proper use of this package requires understanding the underlying PostgreSQL concepts. See https://www.postgresql.org/docs/current/protocol-replication.html. Example In example/pglogrepl demo , there is an example demo program that connects to a database and logs all messages sent over logical replication. In example/pgphysrepl demo , there is an example demo program that connects to a database and logs all messages sent over physical replication. Testing Testing requires a user with replication permission, a database to replicate, access allowed in pg hba.conf , and logical replication enabled in postgresql.conf . Create a database: Create a user: If you're using PostgreSQL 15 or newer grant access to the public schema, just for these tests: Add a replication line to your pg hba.conf: Change the following settings in your postgresql.conf: To run the tests set PGLOGREPL TEST CONN STRING environment variable with a replication connection string (URL or DSN). Since the base backup would request postgres to create a backup tar and stream it, this test cn be disabled with Example:","default_branch":null,"files":null,"tree":[],"storefront":"/r/jackc","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jackc/pglogrepl/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}