You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Pawel Veselov <pa...@gmail.com> on 2020/02/20 17:22:33 UTC

PESSMISTIC_READ takes out exclusive lock on Postgres

Hello.

I've found out that using PESSIMISTIC_READ on an entity with postgres
uses 'for update' lock, which is actually exclusive.

I understand JPA specification says that it's permissible to do that,
but I really need a shared lock for what I'm trying to achieve.

Is it possible to control somehow? I've had to resolve to using native
queries, and I'd like to avoid this as much as possible...

Thank you!
  Pawel.

-- 
With best of best regards
Pawel S. Veselov

Re: PESSMISTIC_READ takes out exclusive lock on Postgres

Posted by Pawel Veselov <pa...@gmail.com>.
Hello.

https://issues.apache.org/jira/browse/OPENJPA-2806

On Mon, Feb 24, 2020 at 10:58 PM Mark Struberg
<st...@yahoo.de.invalid> wrote:
>
> Hi Pawel!
>
> Would need to dig deeper. Can you possibly please create a JIRA ticket for OPENJPA?
> So we can better track this!
>
> Thanks!
>
> LieGrue,
> strub
>
>
> > Am 20.02.2020 um 18:22 schrieb Pawel Veselov <pa...@gmail.com>:
> >
> > Hello.
> >
> > I've found out that using PESSIMISTIC_READ on an entity with postgres
> > uses 'for update' lock, which is actually exclusive.
> >
> > I understand JPA specification says that it's permissible to do that,
> > but I really need a shared lock for what I'm trying to achieve.
> >
> > Is it possible to control somehow? I've had to resolve to using native
> > queries, and I'd like to avoid this as much as possible...
> >
> > Thank you!
> >  Pawel.

[ skipped ]

Re: PESSMISTIC_READ takes out exclusive lock on Postgres

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
Hi Pawel!

Would need to dig deeper. Can you possibly please create a JIRA ticket for OPENJPA?
So we can better track this!

Thanks!

LieGrue,
strub


> Am 20.02.2020 um 18:22 schrieb Pawel Veselov <pa...@gmail.com>:
> 
> Hello.
> 
> I've found out that using PESSIMISTIC_READ on an entity with postgres
> uses 'for update' lock, which is actually exclusive.
> 
> I understand JPA specification says that it's permissible to do that,
> but I really need a shared lock for what I'm trying to achieve.
> 
> Is it possible to control somehow? I've had to resolve to using native
> queries, and I'd like to avoid this as much as possible...
> 
> Thank you!
>  Pawel.
> 
> -- 
> With best of best regards
> Pawel S. Veselov