Sample Header Ad - 728x90

In Postgres 10, how do the choice of SERIAL or UUID type as primary key affect replication, if at all?

1 vote
1 answer
2479 views
A popular answer on SO states that using UUIDs as primary keys has the following benefit: > Makes replication trivial (as opposed to int's, which makes it REALLY > hard) I have been unable to find any evidence in PG's documentation (or anywhere else) to substantiate this claim. The PG docs mention nothing about this having any bearing on replication. For me, if a replica is an exact copy of the master, the type of key used is irrelevant. So, is there something that escapes me? How would integer primary keys, compared to UUIDs, make harder to replicate your postgres db? A related question is whether using UUIDs as primary keys slow down join operations (some people claim they do). Are there any benchmarks on this? Can anybody share experiences?
Asked by ARX (1509 rep)
Jun 12, 2018, 03:57 PM
Last activity: May 9, 2024, 01:27 PM