Can't get logical replication neon-to-neon to work
I've spent a lot of time reading, re-reading, creating brand-new NeonDB's (via Vercel) to get the Logical Replica behaviour to work following these exact steps 3x https://neon.tech/docs/guides/logical-replication-neon-to-neon with no luck. I can see in PGAdmin that the source db (with Logical Replica turned on via NeonDB panel) has the right Publication config. Then i switch over to the subscription DB in another region, follow the instructions and I can see in that DB the Subscriptions information is setup (even though from PGAdmins perspective it's not happy some fields are not populated like "database"|"host"|"port"|... etc). I insert new data from Source but cannot see anything in the replica instance. 😢 I can see on in the Subscribers table fluctuating pg_stat rows (as per screenshots).
Is there anything glaringly wrong with what I'm doing?
Neon
Replicate data from one Neon project to another - Neon Docs
Neon's logical replication feature allows you to replicate data from one Neon project to another. This enables different replication scenarios, including Postgres version migration Moving data from on...


5 Replies
xenial-blackOP•6mo ago
I'm calling in the big guns @Mahmoud to see if you can help with this issue? It's stopping us from scaling our product in other regions. Any guidence will be appreciated.
multiple-amethyst•6mo ago
Hmm not 100% sure. @Daniel Perhaps you might have an idea?
fair-rose•6mo ago
Hi, I just tested the steps in the guide above. I did not run into any issues. Data was replicated from the source db in one region to the target db in another region. Things you can check:
- Make sure that the subscription you define on the target db connects to the sourcedb (using the sourcedb connection string)
CREATE SUBSCRIPTION my_subscription
CONNECTION 'postgresql://neondb_owner:<password>@ep-cool-darkness-123456.us-east-2.aws.neon.tech/neondb'
PUBLICATION my_publication;
- Make sure the table deifned on the target db is exactly the same as the source db table
- Are you starting with data in your target db table? I've seen that cause trouble. Let the subscription populate data from the source db to the tartget db (start with an empty target db table).
xenial-blackOP•5mo ago
Thanks Mahmoud and Daniel. I'll have another go now and let you know.
oh wow, i can see all of my data has been replicated to the US region (from AP). Maybe it was working all along but the Neon UI didn't showcase it?
fair-rose•5mo ago
Glad it's working now. I don't think it would be a UI issue. If you encounter it again, you could try querying via psql to perform a check of your data outside of the UI. If the issue persists, we'd likely recommend opening a support ticket for deeper investigation. https://console.neon.tech/app/projects?modal=support