postgre 开启cdc

Last updated on January 24, 2025 am

🧙 Questions

开启postgre的cdc

☄️ Ideas

docker exec -it isxcode-postgre bash
sed -i 's/http:\/\/deb.debian.org/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
sed -i 's/http:\/\/security.debian.org/http:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
apt-get update
# apt-cache search postgresql | grep decoderbufs
# select version()
# apt-get install -y postgresql-${version}-decoderbufs
apt-get install -y postgresql-14-decoderbufs

# psql -h hostname -p port -U username -d databasename
psql -h localhost -p 5432 -U root -d isxcode_db
ALTER SYSTEM SET wal_level = 'logical';
ALTER SYSTEM SET max_replication_slots = 4;
ALTER SYSTEM SET max_wal_senders = 4;   
ALTER TABLE public.cdc_source REPLICA IDENTITY FULL
docker restart isxcode-postgre
SHOW wal_level;
SHOW max_replication_slots;
show max_wal_senders;

postgre 开启cdc
https://ispong.isxcode.com/db/postgre/postgre 开启cdc/
Author
ispong
Posted on
January 20, 2025
Licensed under