{"id":22428156,"url":"https://github.com/replicase/docker-pgcapture","last_synced_at":"2025-08-01T10:32:22.826Z","repository":{"id":101216416,"uuid":"594781555","full_name":"replicase/docker-pgcapture","owner":"replicase","description":"Demo pgcapture amazing library by docker !","archived":false,"fork":false,"pushed_at":"2023-10-06T03:27:10.000Z","size":91,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-06T07:45:37.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replicase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-29T16:19:53.000Z","updated_at":"2023-10-06T07:45:37.316Z","dependencies_parsed_at":null,"dependency_job_id":"545dcc0b-25a4-4b3c-826c-d46614c2ff3e","html_url":"https://github.com/replicase/docker-pgcapture","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicase%2Fdocker-pgcapture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicase%2Fdocker-pgcapture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicase%2Fdocker-pgcapture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicase%2Fdocker-pgcapture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicase","download_url":"https://codeload.github.com/replicase/docker-pgcapture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228363983,"owners_count":17908319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T20:13:59.278Z","updated_at":"2024-12-05T20:13:59.842Z","avatar_url":"https://github.com/replicase.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-pgcapture\n\nIt's a guidance to setup [pgcapture](https://github.com/replicase/pgcapture) environment by docker.\n\n## Build pgcapture image\nBuild pgcapture image if you do not have pgcapture image in your local environment.\nAnd you can change the pgcapture version in [dockerbuild.sh](pgcapture/dockerbuild.sh).\n```bash\n  (cd pgcapture \u0026\u0026 ./dockerbuild.sh)\n```\n\n## Demo CDC Consumer\n1. Run the script\n   ```bash\n   # default postgres version is 14 and decode plugin is pgoutput\n   # you can specify postgres version and decode plugin by setting environment variables\n   # example: POSTGRES_VERSION=11 DECODE_PLUGIN=pglogical_output ./demo-consumer.sh\n   ./demo-consumer.sh\n   ```\n2. Run the consumer\n   ```bash\n   go run consumer/main.go\n   ```\n3. Connect localhost:5432 postgres and create users table and insert data\n   ```sql\n   create table users (id int primary key, name text not null, uid uuid not null, info jsonb not null, addresses text[] not null);\n   insert into users(id, name, uid, info) values (1, 'foo', 'bc03d615-8afb-452d-b0cc-340087def732', '{\"myAge\": 18}', '{\"taipei\", \"hsinchu\"}'); \n   ```\n4. See the consumer output from postgres source change\n\n## Demo CDC Consumer and Scheduler Dump\n1. Run the script\n   ```bash\n   # default postgres version is 14 and decode plugin is pgoutput\n   # you can specify postgres version and decode plugin by setting environment variables\n   # example: POSTGRES_VERSION=11 DECODE_PLUGIN=pglogical_output ./demo-scheduler.sh\n   ./demo-scheduler.sh\n   ```\n2. Run the consumer\n    ```bash\n    go run consumer/main.go\n    ```\n3. Connect localhost:5432 postgres and create users table and insert data\n   ```sql\n   create table users (id int primary key, name text not null, uid uuid not null, info jsonb not null, addresses text[] not null);\n   insert into users(id, name, uid, info) values (1, 'foo', 'bc03d615-8afb-452d-b0cc-340087def732', '{\"myAge\": 18}', '{\"taipei\", \"hsinchu\"}'); \n   ```\n4. See the consumer output from postgres source change\n5. Run scheduler to dump change to consumer\n   ```bash\n   go run scheduler/main.go\n   ```\n6. See the consumer output from scheduler dump change \n\n## How to change Postgres image version\nYou can use [postgres folder](postgres) to custom your postgres version with pglogcial and pgcapture extensions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicase%2Fdocker-pgcapture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicase%2Fdocker-pgcapture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicase%2Fdocker-pgcapture/lists"}