[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: cascading lock issue
From:       Laurenz Albe <laurenz.albe () cybertec ! at>
Date:       2024-03-27 12:15:02
Message-ID: e22d27f5770e010a55c8fc5ab20e017e90d8e358.camel () cybertec ! at
[Download RAW message or body]

On Wed, 2024-03-27 at 19:33 +0800, James Pang wrote:
> below is a cascading lock and blocking issue [...],
> new coming select on the table got blocked too. since only RowExclusiveLo=
ck
> granted on relation, why the query select got blocked too ? just because
> there is another "alter table" that's sitting in the queue before this
> "select session" ?=C2=A0 is it expected in PGv14?

Yes, it must be th ACCESS EXCLUSIVE lock that is waiting in line and blocki=
ng
everything else (locks have to queue).

Don't run ALTER TABLE when you have long running transactions/queries.

Yours,
Laurenz Albe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic