Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Custom replication slot name #543

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

RobyBen
Copy link

@RobyBen RobyBen commented Nov 23, 2024

Issue #540
client.py
Introduced support for specifying replication_slot_name in the replication logic
Added replication=database to the connection string
Updated application_name

tap.py
Validation for replication_slot_name: <=60 characters, and do not start with pg_.
Added replication_slot_name as a configurable parameter in config_jsonschema, with a default value of "tappostgres".
Passed replication_slot_name to the PostgresConnector.
Added configuration examples

Added test_slot_name.py to the tests folder

…tion.Enhance connection handling with replication=database and dynamic application_name.Validate replication_slot_name format and add to config schema.Provide examples for parallel replication configuration.
@edgarrmondragon edgarrmondragon linked an issue Nov 24, 2024 that may be closed by this pull request
tap_postgres/client.py Outdated Show resolved Hide resolved
tap_postgres/tap.py Outdated Show resolved Hide resolved
@edgarrmondragon edgarrmondragon added enhancement New feature or request python Pull requests that update Python code labels Nov 24, 2024
tap_postgres/tap.py Outdated Show resolved Hide resolved
tap_postgres/tap.py Outdated Show resolved Hide resolved
tap_postgres/tap.py Outdated Show resolved Hide resolved
Comment on lines 634 to 650


# Configuration Example for Parallel Replication

config_1 = {
"host": "database1.example.com",
"port": 5432,
"dbname": "example_db_1",
"replication_slot_name": "slot_1",
}

config_2 = {
"host": "database2.example.com",
"port": 5432,
"dbname": "example_db_2",
"replication_slot_name": "slot_2",
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove these examples or perhaps move them to the readme?

tests/test_slot_name.py Outdated Show resolved Hide resolved
tests/test_slot_name.py Outdated Show resolved Hide resolved
tests/test_slot_name.py Outdated Show resolved Hide resolved
tests/test_slot_name.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

feat: Custom replication slot name
2 participants