I often find myself wanting advisory locks that are automatically released when the transaction ends, so here's a small patch trying to do just that. I don't know much about the lock system so the patch is in the state "it looks like this would work". Any comments on the technical details are welcome. There's obviously a lot of documentation and READMEs to change too, but I thought I'd see what people think about the idea before going there.
So, thoughts?
In my opinion changing current behavior is not a good idea. I know some software that relies on current behavior and this would break it. Maybe add that as an option, or add another type of advisory lock?