3 ms·
While the article doesn't mention it, I think the recommended uuid function for postgres is uuid_generate_v1mc() from https://www.postgresql.org/docs/10/static/
by ryebit 9y ago
While the article doesn't mention it, I think the recommended uuid function for postgres is uuid_generate_v1mc() from https://www.postgresql.org/docs/10/static/uuid-ossp.html https://www.postgresql.org/docs/10/static/uuid-ossp.html
This generates a v1 uuid, so the first few bytes are time dependant, which reduces fragmentation compared to v4 uuids. At the same time, it generates random values for the "mac" section, so it isn't as host-specific and low-entropy as a normal v1 uuid.