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.96) (envelope-from ) id 1w16D6-002Ygo-21 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 17:22:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w16D5-005W2I-0J for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 17:22:03 +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.96) (envelope-from ) id 1w16D4-005W2A-0b for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 17:22:03 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w16D2-00000001zCb-2wi3 for pgsql-hackers@postgresql.org; Fri, 13 Mar 2026 17:22:01 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id CDBCDEC00D9; Fri, 13 Mar 2026 13:21:59 -0400 (EDT) Received: from phl-imap-14 ([10.202.2.87]) by phl-compute-02.internal (MEProxy); Fri, 13 Mar 2026 13:21:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burd.me; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1773422519; x=1773508919; bh=qH9sAiwiM7hy3SVkYHcnlcKyr8zLzj8Zjzs2zXBSokI=; b= CAAnv/s4/LMum6eE4BrdESSVNvVAr8XlX5DHy58itw++NLsgD6pbcD11Xumocmjp e9w4yOeoqqQ8Z4qLDlUtS/Cu+nnvHRQ2b2EkJfZWI/qOH5oTT6RJdqT7w0j6ao4s s7GVjve/auuj4Zw2UmJ6Jsnhi0qWSKc8LCBxFDEQBi4C8ku0NZSBLoOwJyoLpkwZ UqUGiCbnenSBWFQL08mAyvTmTmzARafSXQ6eT82wJodv3I4GINmHTlWeTRvYMDlV 5GFxpXKDWK8eGl9tF9juuWwHXk7JIF0UIxnr6xQZLAWtiK6y4ECYyYWM2JRyfGWW gR3cq+qWpURo1Z3pwZh4TA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1773422519; x= 1773508919; bh=qH9sAiwiM7hy3SVkYHcnlcKyr8zLzj8Zjzs2zXBSokI=; b=U 2tTEd5+wxMwDfBe/uTFEuHOFEXljpuzphLUj5xvgUxPM4g/xCK3riqvAjFYsh/wO PG+t88KcQnNDfSUSbv3NookmpCvG91UeZwCx340cN+7Y6YTHeJYjxAitEDX51cZl 2r8Ju9ykK+W0J4RI3UWPuWhlKroDurpVEO7Hxt8y5RP34u+bgxRzd5oQIgInDeOD KxgCTuhQXWmMBHZboBvWLh/8SyoNcaSb95WCZoK2ahyoJwxEpYHp6IK1vxJ2CErV Bms9QSkL3GjzktX67s6lfdOl15cfimGq3cb7qozEscjO1H//+u/HvPBDEnW1STHn e/qizpONFDHBqFz4s3Q/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvledtvdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfifhrvghg uceuuhhrugdfuceoghhrvghgsegsuhhrugdrmhgvqeenucggtffrrghtthgvrhhnpedvue fhffdtvdevueffteehheefleevtedvfedtueefffeijeefudelveeftdffudenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvghessghurh gurdhmvgdpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghpthht oheprghnughrvgifseguuhhnshhlrghnvgdrnhgvthdprhgtphhtthhopehmrghnnhhird ifohhougesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtohepmhgrpghkrgii rghrsegvshhirdguiidprhgtphhtthhopegshigrvhhuiiekudesghhmrghilhdrtghomh dprhgtphhtthhopehnrghthhgrnhgusghoshhsrghrthesghhmrghilhdrtghomhdprhgt phhtthhopehnvghilhdrtghonhifrgihsehgmhgrihhlrdgtohhmpdhrtghpthhtohepsh hhihhnhigruddurdhkrghtohesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhl qdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i675e48f3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 27CDBC4006E; Fri, 13 Mar 2026 13:21:59 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: AQjVtvS5d0yk Date: Fri, 13 Mar 2026 13:21:38 -0400 From: "Greg Burd" To: "Nazir Bilal Yavuz" Cc: "Nathan Bossart" , "Manni Wood" , "KAZAR Ayoub" , "Neil Conway" , "Andrew Dunstan" , "Shinya Kato" , pgsql-hackers Message-Id: In-Reply-To: References: <43de48dc-701b-4735-881b-50bca6870f39@app.fastmail.com> Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 13, 2026, at 12:14 PM, Nazir Bilal Yavuz wrote: > Hi Greg, Hello Nazir, > On Fri, 13 Mar 2026 at 18:29, Greg Burd wrote: >> >> I've always been a fan of these kinds of optimization so I couldn't resist reviewing, but I know you're ready to commit so I'll just check on some systems I have. :) > > Thank you for the review! Thank YOU for the work fixing this. :) >> At first glance the implementation seems conservative, but correct and safe. Local testing on on Linux/FreeBSD x86_64, and Win11/aarch64/MSVC seem good. I also tried IllumOS/SPARCv9 and with some fixes (from another active thread) to the build system and it worked just fine too. I'm sure the 10 people care will be thrilled. ;- > > Yes, we can probably improve this further with heuristics, but for now > we wanted to avoid introducing any potential regressions. >> I also created a few tests (attached) to check boundary conditions, I might add some along with the RISC-V work. > > Thank you for the tests! I have checked them and the output is the > same on both v17 and master. Do you think it would make sense to add > them as regression tests? If there are tests that materially add to the coverage that's a good thing to consider adding. I don't think all those tests are necessary. best. -greg > -- > Regards, > Nazir Bilal Yavuz > Microsoft