by perlgeek · 2y ago · 0 comments
To me it seems you need to avoid certain constructs, like UNIQUE constraints. Otherwise you might have a local insert plus a replicated one, both the same value in the unique column, and different nodes reject different inserts.
Partial indexes give you approximately the same speedup as deletes.
1. Row bloat.
2. Bad plan estimation due to bloat.
3. Needing filtered indexes for anything that's a row based unique constraint.
4. All history in one table means changing schemas is a PITA, and you're backfilling stuff that's not real.
5. There's more but that's just off the top.
There's always someone who is prepared to downvote, literally or figuratively, something that will eventually be the solution to some problem they created in production.
When I get downvoted for ideas and not demeanor, 2/3rds of the time it's just job security.
If your rows do age out at the same time, then I’d be tempted to ask you why you’re storing logs in a relational database, because that’s essentially what you have at that point.
The article references another article on this, the refers to the PostgreSQL documentation:
- conflicts [1]
- restrictions [2]
You need to be very aware of the limitations to decide whether this is usable in a specific context. I don't think this is really intended to be used for "bi-directional" logical replication.
[1] https://www.postgresql.org/docs/current/logical-replication-...
[2] https://www.postgresql.org/docs/current/logical-replication-...
Something like a distributed metrics collection system.
I used to do this with 3 way DB2 LUW replication back when i was a DBA. It all needs a bit of thought but is fairly simple when it comes down to it.