tursodatabase / pg_turso

Postgres output plugin for replicating data to Turso.
MIT License
71 stars 3 forks source link

push replication via postgres LISTEN/NOTIFY #11

Open tarasglek opened 1 year ago

tarasglek commented 1 year ago

Would be nice if in addition to doing interval-based replication, we could further reduce latency with a postgres table trigger that calls pg_notify(). https://www.postgresql.org/docs/current/sql-notify.html

this way if a notify is missed/fails, we still fallback on interval-based replication, but most of the time would get near-realtime table updates.

Not sure if this possible with how you are replicating tables.

psarna commented 1 year ago

Thanks! This is heavily experimental work, so we'll consider everything, including a total rewrite (: so every bit of context helps.

We're also considering whether it makes sense to replicate by teaching Turso the subscriber protocol on which publication/subscription is implemented: https://www.postgresql.org/docs/current/logical-replication-publication.html

samuelbohl commented 8 months ago

I would really love to use this extension! Any update on this?