Hi there! Could someone help me understand whether...
# replication-troubleshooting
n
Hi there! Could someone help me understand whether using a single CDC PostgreSQL source with multiple destinations is a valid usecase? What I don’t quite get is what’s going to happen to the pg replication slot after it will be emptied into the first destination? Will Airbyte somehow fan out the changes into all destinations at once, or will it simply not see any delta for every subsequent destination?
s
Hey @Nikolay Shebanov, sorry for the late reply. I could be wrong but I don’t believe that Airbyte will see the delta for each subsequent destination. I’ve never heard of this usecase so I’m not sure if it’s valid or not. What would be the advantage here/
n
Hey @Saj Dider (Airbyte) thanks for checking in! No advantage here, it was more of a confusion on my part than a feature request. Currently, it’s possible to connect more than one destinations to a single CDC source, which might lead to an inconsistent replication behavior. It’s not documented explicitly what would happen during subsequent replication sessions connected to a single postgres replication slot, I’d assume both destinations would end up with an incomplete set of changes, and probably some more weird behavior. From PostgreSQL docs:
Copy code
A logical replication slot knows nothing about the state of the receiver(s). It's even possible to have multiple different receivers using the same slot at different times; they'll just get the changes following on from when the last receiver stopped consuming them. Only one receiver may consume changes from a slot at any given time.
Do you think it might be worth clarifying this in the docs? Otherwise, I’d say the desired behaviour would be for Airbyte to prevent setting up a second connection on a CDC source without removing the first one.
s
It’s a good question. On one hand, if you have to ask if something is worth clarifying in the docs, it usually means it is in fact, worth clarifying in the docs. For starters, could you make a related issue about this on our github and post it here so I can tag it properly? I’m still on the fence on whether or not it’s worth mentioning it in the docs or if we just want to have it documented somewhere so people with a similar question/usecase want to know how this set up would behave with Airbyte.
n
@Saj Dider (Airbyte) here you go: https://github.com/airbytehq/airbyte/issues/19082
s
Thanks @Nikolay Shebanov, feel free to ask more questions here in the channel!