create index concurrently blocked by other query

From: James Pang <jamespang886(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: create index concurrently blocked by other query
Date: 2024-03-23 13:29:55
Message-ID: CAHgTRfcE-LifnO81E2dTK4dKiUcSjqG0U=Gs5T_zAH=jUxJqGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
PGv14, it's a time range partition table, we first create index ... on
ONLY parent table and it's done very fast, then we are doing "create index
concurrently ... on each partition table", then we saw it blocked by some
other sessopm "select on other tables" , is it expected ?
from pg_locks, and pg_stat_activity :
for this relation we are creating index concurrently, only "access share"
lock by other sessions:

blocked pid 512694:
blocked query: CREATE INDEX CONCURRENTLY IF NOT EXISTS
IDX_XMEETINGMETADATA_P202401_xxxID ON xxxxxx_P202401(xxID,SssID); |

blocking pid 90252
blocking query: it's a select from other tables not the one we are creating
index concurrently..
SELECT m.Meetingxxx mxxxKey, m.MTGxxxx....,

+
| | | |

Thanks,

James

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2024-03-23 13:33:39 Re: Cursor with hold for select
Previous Message Bindra Bambharoliya 2024-03-22 16:24:01 Cursor with hold for select