"Jim C. Nasby" <jimn(at)enterprisedb(dot)com> writes:
> I believe recommending that you not use locks with the first
> int4 above 16k (and whatever the equivalent would be for int8) would be
> a good way to do that, as it would allow for segregating locks by schema
> OID.
That seems pretty content-free to me, if not counter-productive. To the
extent that we can foresee the usage for the two-int4s lock style, the
first one is likely to be an OID (eg, a user table's OID) which the user
is not going to be able to control the range of. Also, if you are
locking on the basis of object OIDs, there's no need to worry which
schema they are in.
regards, tom lane