It's a guidance to setup pgcapture environment by docker.
Build pgcapture image if you do not have pgcapture image in your local environment. And you can change the pgcapture version in dockerbuild.sh.
(cd pgcapture && ./dockerbuild.sh)
# default postgres version is 14 and decode plugin is pgoutput
# you can specify postgres version and decode plugin by setting environment variables
# example: POSTGRES_VERSION=11 DECODE_PLUGIN=pglogical_output ./demo-consumer.sh
./demo-consumer.sh
go run consumer/main.go
create table users (id int primary key, name text not null, uid uuid not null, info jsonb not null, addresses text[] not null);
insert into users(id, name, uid, info) values (1, 'foo', 'bc03d615-8afb-452d-b0cc-340087def732', '{"myAge": 18}', '{"taipei", "hsinchu"}');
# default postgres version is 14 and decode plugin is pgoutput
# you can specify postgres version and decode plugin by setting environment variables
# example: POSTGRES_VERSION=11 DECODE_PLUGIN=pglogical_output ./demo-scheduler.sh
./demo-scheduler.sh
go run consumer/main.go
create table users (id int primary key, name text not null, uid uuid not null, info jsonb not null, addresses text[] not null);
insert into users(id, name, uid, info) values (1, 'foo', 'bc03d615-8afb-452d-b0cc-340087def732', '{"myAge": 18}', '{"taipei", "hsinchu"}');
go run scheduler/main.go
You can use postgres folder to custom your postgres version with pglogcial and pgcapture extensions.