#community-help

Realtime Synchronization of Postgres DB with Typesense

TLDR Ahmad asked how to sync Postgres DB with Typesense in real time. Kishore Nallan suggested handling it through the application layer, using queues and lambdas, or running daily dumps.

Powered by Struct AI
Dec 14, 2021 (25 months ago)
Ahmad
Photo of md5-4a6338a1d6016269c9f234fc1a133144
Ahmad
11:41 PM
One more question
I want to add realtime syncronization of postgress db with typesense. how is it possible ?
Dec 15, 2021 (25 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:30 AM
Ahmad Typically, a search collection will be a "joined" view of several individual columns across multiple tables, so a 1:1 replication from postgres is best handled through the application layer.

For e.g. you can write to a queue like SQS and then have a lambda that indexes the change into Typesense. Or you could even call Typesense directly right after the DB operation is made.

Another approach is just running daily dumps if the data does not change often.