3 ms·
Great tool! I've recently started experimenting with PostgreSQL logical replication as part of a project where we’re pruning data from our main database and arc
by oriavicii 2y ago
Great tool! I've recently started experimenting with PostgreSQL logical replication as part of a project where we’re pruning data from our main database and archiving it to S3 for future use. However, some tables need to be available in a secondary Postgres instance specifically for read operations, which is where replication comes in.
I’m encountering a challenge due to two types of delete operations in the main database. The first delete operation is for data pruning, and I don’t want these deletions to be reflected in the replicated database. The second delete operation is for rollback purposes, which alters the data state, and these deletions should indeed be replicated to maintain consistency.
Is there a way to distinguish between these two delete operations so that only the rollback deletions are replicated? And would your tool support this kind of use case?
- shayonj 2y agoThanks for sharing. That is an interesting use case. I reckon you will be able to take advantage of the rules or routing feature in pg_flo. Is there some column that can help you identify the two separate types of deletion operations or perhaps time of the day? If its easier, happy to also chat more on an issue in the repo or email (shayonj at gmail)