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 1t5R3B-006444-Jv for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 14:48:57 +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 1t5R39-007EI0-73 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 14:48:55 +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 1t5R38-007EHs-Qx for pgsql-hackers@lists.postgresql.org; Mon, 28 Oct 2024 14:48:55 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t5R36-003HpH-Oh for pgsql-hackers@lists.postgresql.org; Mon, 28 Oct 2024 14:48:53 +0000 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2e2a999b287so3500841a91.0 for ; Mon, 28 Oct 2024 07:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730126931; x=1730731731; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GaBaftjD319Tdy0dUNl3c+UHoZng156C+4YEwPOEZBw=; b=MJDZ+Oy5FuOKKtd/M1mCzGAy/z7BMEjRPQfUpjAIJ4qN/5NIFG51cgCvjV245SmPov 50O0q7pDCzQkR+ddFmz1+x7BHozqziFbyKhQ3al84+mzPRGuKzHXF4fbAzAGDdI4D706 /sZ1Zxu457z12m5A/UoVSYyaKa+Afy0lc5Pr3hGL+DGcZ6QTp+jpVqEGJW9XpSpv6UFY N70oP3GtnA3FHNFcRzTvjhjH+axuwv1RoDeZhclySqMqW5r9LV6ZQfwCOtiiSf4U3EJq xJAqU/qz29MJvT//WPCZj/5JC0Z3kAVmfKrYTsbAr+FiuBjMagU4kxoY9uv72yxGd4qM KQ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730126931; x=1730731731; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GaBaftjD319Tdy0dUNl3c+UHoZng156C+4YEwPOEZBw=; b=TQFykc/liEiKtRGMfR4N5swgl85PX3+8I3cNksyt6RplQBWpqudSPGRV32QSjjn+Se PssoPev4flUHho/AOg2KLg9cIGswd0bUXbi5sXcLsdiVMotFOLZ0S5ORgDMw2v2b3UGf mbsDo1AhtOsEik3fCqRJV6xPFdAPTFAvBzLJhISizHdvPWkJrZo8SMfcezYVK92vQJ9e kpdGPyqoZUTOYGW1Xj4ENnmgqbHFKzkDiTR6q+pT5Rlob3lk5V5YPA/BOzvOycvaWleL UR9wY1UvaVWI1nspOslRKzZfr1M0QAzzVn9zXObNh2rxEk05ebH4vg9Ev+oen+rOkCUj RNEw== X-Gm-Message-State: AOJu0YxnJ046c8+6qr6rlBR6sziqCyaWqsEOcBTF1oSNXJFjGl5uFldg gnTYJeaP0beGkURt4ss7vArlDncWn3f3hJ/ULzR6Vinsd6uTDcG8 X-Google-Smtp-Source: AGHT+IHqKefFDanAL6eo2BgzOaWfBq44mh+M6vASm/AMT7Wtmfp0VF8zhezMVoZP6INAqTd83ZF0Dg== X-Received: by 2002:a17:90a:6fe3:b0:2e2:ca12:6bc7 with SMTP id 98e67ed59e1d1-2e8f11b884fmr10970430a91.33.1730126931306; Mon, 28 Oct 2024 07:48:51 -0700 (PDT) Received: from smtpclient.apple (n220246094186.netvigator.com. [220.246.94.186]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e8e3555c71sm7328746a91.11.2024.10.28.07.48.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2024 07:48:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: Re: Introduce new multi insert Table AM and improve performance of various SQL commands with it for Heap AM From: Jingtang Zhang In-Reply-To: Date: Mon, 28 Oct 2024 22:48:34 +0800 Cc: pgsql-hackers@lists.postgresql.org, PostgreSQL-development , Andres Freund , Masahiko Sawada , Dilip Kumar , Luc Vlaming , Justin Pryzby , Michael Paquier , Matthias van de Meent , Alexander Korotkov , Jeff Davis Content-Transfer-Encoding: quoted-printable Message-Id: <896679FF-4B81-4832-BCFE-4CE39F6F0048@gmail.com> References: <20230603223824.o7iyochli2dwwi7k@alap3.anarazel.de> <6be6f58815dc0844fbe058edf56b4e735a6efc1c.camel@j-davis.com> <2280bf7241119bb88cbe0fe5eb36490cbd04c0c0.camel@j-davis.com> <12f1a2d8dd3b6305c0354f1c701f44b7be5e54eb.camel@j-davis.com> <8633171cb034aafc260fdf37df04b6c779aa1e2f.camel@j-davis.com> <229c4f7219ed164088dadc935df21e1cf125e191.camel@j-davis.com> <23a29125a2d07f96d49f97c31fcdb09a7f0ff6c1.camel@j-davis.com> To: Bharath Rupireddy X-Mailer: Apple Mail (2.3818.100.11.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Oh, another comments for v24-0001 patch: we are in heam AM now, should = we use something like HEAP_INSERT_BAS_BULKWRITE instead of using table AM = option, just like other heap AM options do? > + if ((state->options & TABLE_INSERT_BAS_BULKWRITE) !=3D = 0) > + istate->bistate =3D GetBulkInsertState(); =E2=80=94 Regards, Jingtang