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 1sj3yw-00DkjQ-OV for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Aug 2024 21:44: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 1sj3yu-00DAXo-VX for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Aug 2024 21:44:05 +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 1sj3yu-00DAXg-LF for pgsql-hackers@lists.postgresql.org; Tue, 27 Aug 2024 21:44:05 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sj3ys-001kHn-PP for pgsql-hackers@postgresql.org; Tue, 27 Aug 2024 21:44:03 +0000 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2d3bae081efso4714300a91.1 for ; Tue, 27 Aug 2024 14:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1724795041; x=1725399841; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=58Uanf1K99AHdW8/fwBIwZLouPkL/hu0/8oiz/WQxIk=; b=w6r8B6N3d0Enmg1vIVqS+BFFdXQaMGJTajHvnFCU9JH1LSMwrarX12o63bPvjF8flz rRiMrxogBoOFhmUjuLx4o20Zknl6Lfy28i2ArOiDk4K7YeyxcpYmCVxsJjIv/4xIcYzN Bd7VvY9Hu2T3PC7miyflGyxSJMNn27qB+d8eT+4JV4x1UJkhpCt101ixHXv8nV3/oGqq SSmf+jCtJENHH+ka60PhcmTIOXxS6DHN9hqii/q5LPJpjMp34w1gzEfgxm7MCq++VjHF 9BCfVBPhmWgILPbDy6jy/udy8zztxphj0ZFxz3KjIEMqrCufsCy548BY+MmNvU6o11a7 cWUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724795041; x=1725399841; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=58Uanf1K99AHdW8/fwBIwZLouPkL/hu0/8oiz/WQxIk=; b=KYz2geRGJqzO35gI8bwdQyl9MuxFo+Y9UjPa8qxNh/LPMww/vTEf+hTM+yVLL1QZ4z QT2TMruPA45TR/riRx2XD2OEy0hpmGfdi4HkSpXYDXU7Jycuo4pGGF1KqyaF/6gx+E8l G1nlat7ajnSBVRdQ3ISXnFAkgtaSPSNhS7KOaMqAJp5RtOB7buP3ZVLxRBKeuduELc2z qrUY1q8htR6TZ7ZOgSop2Y98rtlqjKIJvfYmab6pLs4AiEa16AdyPgPUP3wUSc9HVMv/ ZSSteQmNEsnDcwCj/HeURdZiP1LFtW8T9lCcL+JbUsyyCWY0lMEulNYDON4UPnJIwRQ8 Hu/w== X-Forwarded-Encrypted: i=1; AJvYcCWT8kOpNNAi3FTs3L6T5qTnBJ5s7B9FCdj96XEGoER9yUdDKMec9kNQ7oDBWpMV52qPMmLrk/+FWBpqQxLB@postgresql.org X-Gm-Message-State: AOJu0YzA+FPEGGK7DfTeowOjwgoXcbRsL33aFu9fziuO8dt8x5KemV7y HbkZzytA9JGsUzaUgY+1jxe+P10DK8zgwPL+219OZZ1QCmtPQwsd2pvucFQ7KQ== X-Google-Smtp-Source: AGHT+IE17Zr3I2URL7/OTuy/Uivu5sOFTZ/K5L9fNBoLOsaIjpm+mXnRhu/ceXoM6K9CgWodyOzrfA== X-Received: by 2002:a17:90a:d984:b0:2c9:9fdf:f72e with SMTP id 98e67ed59e1d1-2d646d385f1mr15750531a91.26.1724795041351; Tue, 27 Aug 2024 14:44:01 -0700 (PDT) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d6139253d8sm12882492a91.17.2024.08.27.14.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 14:44:00 -0700 (PDT) Message-ID: <23a29125a2d07f96d49f97c31fcdb09a7f0ff6c1.camel@j-davis.com> Subject: Re: Introduce new multi insert Table AM and improve performance of various SQL commands with it for Heap AM From: Jeff Davis To: Bharath Rupireddy Cc: Masahiko Sawada , PostgreSQL-development , Andres Freund , Dilip Kumar , Luc Vlaming , Justin Pryzby , Michael Paquier , Matthias van de Meent , Alexander Korotkov Date: Tue, 27 Aug 2024 14:43:59 -0700 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2024-08-26 at 14:18 -0700, Jeff Davis wrote: > 0001 implementation issues: >=20 > * We need default implementations for AMs that don't implement the > new > APIs, so that the AM will still function even if it only defines the > single-tuple APIs. If we need to make use of the AM's multi_insert > method (I'm not sure we do), then the default methods would need to > handle that as well. (I thought a previous version had these default > implementations -- is there a reason they were removed?) On second thought, it would be easier to just have the caller check whether the AM supports the multi-insert path; and if not, fall back to the single-tuple path. The single-tuple path is needed anyway for cases like before-row triggers. Regards, Jeff Davis