Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1roj7P-0032NY-Mk for pgsql-admin@arkaria.postgresql.org; Mon, 25 Mar 2024 12:08:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1roj7N-002vnh-Q3 for pgsql-admin@arkaria.postgresql.org; Mon, 25 Mar 2024 12:07:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1roj7N-002vnW-CV for pgsql-admin@lists.postgresql.org; Mon, 25 Mar 2024 12:07:57 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1roj7K-006OWG-5B for pgsql-admin@lists.postgresql.org; Mon, 25 Mar 2024 12:07:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description; bh=IIOAtZPJaPqzSn/dnuuqgxl0cl1ASfV0nV8JHc7P7ac=; b=ZCHw2phn/p1tzJqkzcf2yQ2h/N S4Qb58F6TQ41MiD1GtIdLN4VLR2YumKGxYsjXrj3MrlkJbtT8Us3HsMMdXZYo6JyapHkdoUNgCf7R wCDGoEJyZvn4O02bJE1l2aKSgI69d72JgLHOAKb0CeeVez9QR3Z+0Z885mBumkAd6t5g=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1roj7I-000zVm-31; Mon, 25 Mar 2024 13:07:52 +0100 Date: Mon, 25 Mar 2024 13:07:52 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: James Pang Cc: pgsql-admin@lists.postgresql.org Subject: Re: create index concurrently blocked by other query Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 23, 2024 at 09:29:55PM +0800, James Pang wrote: > 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 ? Yes. create index will continue its work as soon as all transactions that are started than itself (the create index transaction) will end. Best regards, depesz