I have been stuck getting pgsync working for the past week and I've tried tinkering around w/ different configurations, but nothing seems to be working.
Error Message (if any):
pgsync | (Background on this error at: https://sqlalche.me/e/14/e3q8)
pgsync | Traceback (most recent call last):
pgsync | File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
pgsync | self.dialect.do_execute(
pgsync | File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
pgsync | cursor.execute(statement, parameters)
pgsync | psycopg2.errors.ConfigurationLimitExceeded: all replication slots are in use
pgsync | HINT: Free one or increase max_replication_slots.
Reproducible example:
conf.sql
ALTER SYSTEM SET wal_level = logical;
ALTER SYSTEM SET max_replication_slots = 1;
populate.sql
CREATE TABLE IF NOT EXISTS product (
pk_id SERIAL NOT NULL,
name varchar(100) NOT NULL,
PRIMARY KEY ("pk_id")
);
INSERT INTO product (name) VALUES ('test product1');
INSERT INTO product (name) VALUES ('test product2');
INSERT INTO product (name) VALUES ('test product3');
FROM python:3.9
ARG WORKDIR=/app
RUN mkdir $WORKDIR
WORKDIR $WORKDIR
COPY ./pgsync ./
RUN pip install git+https://github.com/toluaina/pgsync.git@3.0.0
RUN chmod +x ./wait-for-it.sh
RUN chmod +x ./runserver.sh
PostgresDockerfile
FROM postgres:14
COPY ./pgsync/conf.sql /docker-entrypoint-initdb.d/
COPY ./pgsync/populate.sql /docker-entrypoint-initdb.d/
RUN chmod a+r /docker-entrypoint-initdb.d/conf.sql
RUN chmod a+r /docker-entrypoint-initdb.d/populate.sql
PGSync version: 3.0.0
Postgres version:
postgres:14
Elasticsearch/OpenSearch version:
latest
Redis version:
latest
Python version:
3.9.0
Problem Description:
I have been stuck getting
pgsync
working for the past week and I've tried tinkering around w/ different configurations, but nothing seems to be working.Error Message (if any):
Reproducible example:
conf.sql
populate.sql
schema.json
PgsyncDockerfile
PostgresDockerfile
docker-compose.yml