> ... make it possible to select a pg database based on async or sync replication
Can you explain why you doing this? Is this application data vs. time-series?
Can you explain why you doing this? Is this application data vs. time-series?
Sync on the other hand won't return from the transaction until the change is replicated.
For time series, generally async is acceptable, and even for regular data most people might also be fine with async (that's why it is the default). Sync is used if you absolutely aren't allowing any data loss. But because it waits for all nodes to confirm they wrote data to the disk writing will always be slower.
The problem is that if you use physical replication it applies to all data in the database (the logical resource not the physical server), so my guess is that some of the non-time series data has higher durability requirements.