Postgres advisory lock when key doesn't fit
The usual way of solving such issues is to use a hash function that would produce a (nearly-)unique value that fits your purposes - in this case a pair of integers or a single bigint.

Unfortunately, to my knowledge there is no such built-in hash function in PostgreSQL.  You can adopt different solutions though:


use the built-in md5() and truncate it to bigint
find a 3rd party solution, like hash64 (warning: I haven't tried this yet, so no idea if it is a good hash function or not)