backy icon indicating copy to clipboard operation
backy copied to clipboard

advisory locks

Open equivalent opened this issue 7 years ago • 3 comments

hi, I was wondering is the project using advisory locks / or is keen to use them (PR welcome maybe?)

...as is a way this could be nearly as fast as Redis

  • https://github.com/chanks/que
  • https://gist.github.com/chanks/7585810

thx

equivalent avatar May 11 '17 18:05 equivalent

If you can implement it, I welcome a PR with tests (even if the current code is not fully tested and I hadn't time to change that).

Do you plan to use SKIP LOCKED? I think it is a 9.5 feature. If it is, we should do a major version bump and clearly state that this is 9.5 only.

kuon avatar May 11 '17 18:05 kuon

That's the thing I'm just starting to play around with advanced PostgreSQL features and looking for excuse where to use them. As I don't want to start from scratch I'm just looking for a project where to implement them (Ruby or Elixir) . So what we can do is enable this as:

  • some "optional" feature of the lib.
  • or a experimental feature,
  • or I can do a fork that can separate from your project for a while and then we backport the commits
  • anything else

I don't mind really the form it's up to you what do you prefer, I'll just do it.

As for the implementation of SKIP LOCKED I still need to dig deeper into what other experts recommend for this "non lock" transactions and play around with multiple options as I've never worked with Postgres like this.

But one thing to point out is I'm not planing to do any PR this summer :) (as I usually contribute to OpenSource in winter when is not a beautiful weather outside :) ) So if you or anyone else want to do this before me I don't mind, if not I can start working on this later this year and by then we can collect some suggestions in this GH issue

equivalent avatar May 16 '17 09:05 equivalent

I'd like it to be an optional feature.

There is no hurry, do it when you want:)

kuon avatar May 16 '17 11:05 kuon