Do you need a single field for the pk or can you just make it the (original_table_pk, modified_time)? Alternatively, you could generate a uuid v3 from the (original_table_pk, modified_time) using something like uuid_generate_v3(uuid_nil(), original_table_pk || ":" || modified_time)?