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 1uFUwf-0057Km-Ns for pgsql-performance@arkaria.postgresql.org; Thu, 15 May 2025 09:32:06 +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 1uFUwe-00DTkY-Qx for pgsql-performance@arkaria.postgresql.org; Thu, 15 May 2025 09:32:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uFUwe-00DTkP-Fl for pgsql-performance@lists.postgresql.org; Thu, 15 May 2025 09:32:04 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uFUwc-001tpA-08 for pgsql-performance@lists.postgresql.org; Thu, 15 May 2025 09:32:03 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-326cf24aa35so7927111fa.2 for ; Thu, 15 May 2025 02:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747301521; x=1747906321; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=e0gfuDT0RgFmPU/zQJ40YR51ETeRFa7FS3seY6P24UY=; b=aH5rW9w9T8FTcIhGdrDB1exaXJbpQCyeS4De+L529F+FQcnIKE/VUUdFOkkWN21aCI Kmxq6OT4yEBe5TcvXa4spB6+3hTU24dpcVxd5bMdOxxnlkMwX0AcLQIobJrK+qbRkCIx vtYOpeYLX3ZeNO95W1tzyoMb6pOypR0FNNJ9cW69ATACARVXaB+/pNaRj5bEmgUePzJH ESBOqe8Mox9KLbX/j32d04rU3pIAsR3k7zaW8UsscLVEHl5rsSsUOaarRUFa/HNqD5eC lhLwRnuKa1Wc3FHEAsnYLHCNxFq3SMLemreJpQEMIqsc9uhSTNNzhIHOh2+SgdNtksuk 2MGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747301521; x=1747906321; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=e0gfuDT0RgFmPU/zQJ40YR51ETeRFa7FS3seY6P24UY=; b=ZXsKgq/6SIry95ss3bJ+I6afxLSAUU5bse4AkQIlcmsPpmkFSD3qN3UAoLdHd81pnL jPmXZhbiLU4wmo+ZlaPNfwuWwrd2WZvYfm/2etGHV4oEztqJisNh8Clj2f2xCRfnK1Y9 t3A/5cOegjRNyp3vHVcTeA9z+N5+ZlAfXpAq9XYv9qzfuFi84Dhh9WMY9A88GeMwRrN9 7Jsbbk+LupXdI7tack0sJnc2Rhp+CFVtMCxZcKFd7z7p0p7heR22Omn19FYMCrmhJKee USkAOnyI1yjKRAa/X6xOL+z0I8Ml8d/5RL1t04gSWV7SCctMSppRhhFKVsM3tSUMoqPX oATw== X-Gm-Message-State: AOJu0YxQTNbPrPMV27jqIFpfUULBIfHLCOjZIj7fadUkys8VZYFnTMOV Y9SpvleLVdump7M8H2Se/hKXDo+41Hrl2Hffro9hGr7wmjgZNi3qYLeMEefOAm028pcxphJ2hDK +tMbWgBaLBKwH3Dq8K0N016/p3bh8Vgfk X-Gm-Gg: ASbGncsD5D+MmZsbm2W/URCrZCQ1lNzBTOl9z3S3Y3JLRxw3KAX9qW1UwTlE7D1DaOC vXUYqahKj2KVVjV+8Dcy1ZjebbHL7AHRJx7AZOBLHl5v0Hg0s/C9wY1UydE8DcJES9caADn1FQv w77oeWX63SK6cm+etmpbIMZdSnflN+cGRb X-Google-Smtp-Source: AGHT+IHeHIietOg8L6OXL4xR65WWPbS2afUzB7+Wk2NoZQ8CyzxitS+H/E/qAvttUOnmZRkO0w64QHQxyIPJpKiuV7U= X-Received: by 2002:a17:907:968f:b0:ad2:4b73:2f0e with SMTP id a640c23a62f3a-ad515d752a8mr168011266b.10.1747301510005; Thu, 15 May 2025 02:31:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Chetan Date: Thu, 15 May 2025 10:31:12 +0100 X-Gm-Features: AX0GCFvZMmhbjwDcBJKputXz3z9tldWHQd1ZxwIWV6W1h_L3UzW5vxQmW5ahJ5s Message-ID: Subject: Re: a lot of session wait on lock relation To: James Pang Cc: pgsql-performance@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d1eccc0635295566" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d1eccc0635295566 Content-Type: text/plain; charset="UTF-8" Hi James, Could share the related test setup details? Would like to look into this. Thanks, Chetan On Thu, 15 May 2025 at 09:27, James Pang wrote: > Hi, > PGv 15.10, many session coming in doing "insert into tablexxx > values...." in parallel, this is a range partition tables, total 12 > partitions plus one default partition, only three btree indexes, no others > constraints ,no foreign key. but we see hundreds of session waiting on > "lock:relation", why inserts into partition table cause "relation lock" ? > > Thanks, > > James > -- -- Regards, Chetan +353899475147 +919665562626 --000000000000d1eccc0635295566 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi James,

Could share the related test = setup details?=C2=A0
Would like to look into this.

=
Thanks,
Chetan


On Thu, 15 May 2025 at 09:27, James Pang <jamespang886@gmail.com> wrote:
Hi,
=C2=A0 =C2=A0= PGv 15.10,=C2=A0 many session coming in doing "insert into tablexxx va= lues...." in parallel, this is a range partition tables, total 12 part= itions plus one default partition, only three btree indexes, no others cons= traints ,no foreign key. but we see hundreds=C2=A0of session waiting on &qu= ot;lock:relation", why inserts into partition table cause "relati= on lock" ?=C2=A0

Thanks,

=
James


--
--
Re= gards,
Chetan

+353899475147
+919665562626

<= /div>
--000000000000d1eccc0635295566--