Just use uuid4 for completely random UUIDs. No need to worry about collisions.
edit in response to the comment . In my experience, redundant data sooner or later leads to inconsistencies. There is a reason why avoiding redundancy is the dogma of a relational database.
Therefore, do not use the UUID as a “backup backup” for the actual data “source computer” and “timestamp”. Either use it as a unique unique identifier that does not contain any other information, or do not use it at all.
source
share