Re: SHARED LOCKS , EXCLUSIVE LOCKS, ACCESS EXCLUSIVE LOCKS

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: aditya desai <admad123(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: SHARED LOCKS , EXCLUSIVE LOCKS, ACCESS EXCLUSIVE LOCKS
Date: 2021-04-06 15:49:54
Message-ID: 71478dc7-3151-39ed-01ec-15510e8d0adf@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On 4/4/21 6:42 AM, aditya desai wrote:
> Hi,
> We have few select queries during which we see SHARED LOCKS and
> EXCLUSIVE LOCKS on tables. Can these locks cause slowness? Is there
> any way to reduce the locks?
>
> What must be causing ACCESS EXCLUSIVE LOCKS when the application is
> running select queries? Is it AUTOVACUUM?
>

Suggest you read this part of The Fine Manual:
<https://www.postgresql.org/docs/current/explicit-locking.html>

cheers

andrew

--

Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message aditya desai 2021-04-07 08:09:47 Re: select count(*) is slow
Previous Message Andrew Dunstan 2021-04-06 15:44:30 Re: select count(*) is slow