pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Pang <jamespang886@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: create index concurrently blocked by other query
Date: Sat, 23 Mar 2024 12:37:22 -0400
Message-ID: <1409589.1711211842@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHgTRfcE-LifnO81E2dTK4dKiUcSjqG0U=Gs5T_zAH=jUxJqGw@mail.gmail.com>
References: <CAHgTRfcE-LifnO81E2dTK4dKiUcSjqG0U=Gs5T_zAH=jUxJqGw@mail.gmail.com>

James Pang <jamespang886@gmail.com> writes:
>     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 ?

Yes, read the documentation.  CONCURRENTLY avoids blocking other
transactions, at the cost of being easily blocked itself.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <1409589.1711211842@sss.pgh.pa.us>
Permalink:  ../1409589.1711211842@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1409589.1711211842@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jamespang886@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: create index concurrently blocked by other query
  In-Reply-To: <1409589.1711211842@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox