Re: cascading lock issue - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: cascading lock issue
Date
Msg-id e22d27f5770e010a55c8fc5ab20e017e90d8e358.camel@cybertec.at
Whole thread Raw
In response to [MASSMAIL]cascading lock issue  (James Pang <jamespang886@gmail.com>)
List pgsql-admin
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 RowExclusiveLock
> 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" ?  is it expected in PGv14?

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

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

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: James Pang
Date:
Subject: [MASSMAIL]cascading lock issue
Next
From: Tayyab Fayyaz
Date:
Subject: [MASSMAIL]Replication from PostgreSQL to Greenplum