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 1x42tm-006rJ1-0h for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 20:58:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x42tk-00A2qa-2T for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 20:58:32 +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.96) (envelope-from ) id 1x42tk-00A2qS-1W for pgsql-hackers@lists.postgresql.org; Tue, 08 Sep 2026 20:58:32 +0000 Received: from mail-qk2-x10.google.com ([2607:f8b0:4864:34::10]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x42ti-00000003e8f-13Y4 for pgsql-hackers@postgresql.org; Tue, 08 Sep 2026 20:58:32 +0000 Received: by mail-qk2-x10.google.com with SMTP id d75a77b69052e-52fb76543e1so5497281cf.0 for ; Tue, 08 Sep 2026 13:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788901109; x=1789505909; darn=postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=nCLczGM0kNaC0Y/r6RvlcHA6dNS41EpvoE4mN10N174=; b=SdJhZnsDwvykGrDALJ9UN1oRDAHLdmTh5NBLgP3P5cTV0y0RClh53XBfRT+yGEoTzT U3wdFrGJrOXGA/u8iykVjr2cjLJ4A2aaCQtrQekbEGIpWs2H2O4fOi4lBhV9LiCZ1GaZ Wclo1u+6qeSKftYV7LiJ342Hq+jBinKBA14zk0iJnVAWby+kg2zA1Q0V8dFE1fmyqan5 7j8aHdfQIsDtHP7QZt7nrpXKb89gCqbUjJJpP85L8dggptseOSRf3S6t9aXrozULoTlj ICtihRi9gp7FzpfFhqPWP+sUTudEcoGde7yjPVl6BMq8e40qmbG9nI3LxY45vWYtH8a2 a+PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788901109; x=1789505909; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nCLczGM0kNaC0Y/r6RvlcHA6dNS41EpvoE4mN10N174=; b=W4xCQAG3bHHLecfcJXmUttcHua82ayP9UKWcPleue4kTwHcu8rG78sbCbJwyrD54VW tiiOCpebzczXe6sMIRnhltopA3q6q05LlwAaiV7DNzdQ2i18qwi+gOae5jK/iqdd2g5M tTYaeQM7kCSuVEI3Ks6pieAUbSZHI3zDd56g4qryIDA/chcP1eSdFr7h0y/4ceFpqgDH 41D+u1oiLKofIpOmqZBZNaPUFjdpDM3fz5bwJhtz2KAeKWS9tRokIBv4K7kKQdC58/CR zWQaAKhdawZrN8qW7pfBDOrOQFndN0AhLTLWXVo8l9RQAycXDOsVULpG/zXtnkHriNkm efDA== X-Forwarded-Encrypted: i=1; AKwUvBwTtgEWf2I7XvNKAG7tXqox+y7i3VsXA/6HF4OSgmjh93i9Bx49ja+AaxK7NCMmmf/ioa/LgdFddxoUkMON@postgresql.org X-Gm-Message-State: AFuF++mH76RfNJ3fhxvfJV8A2/AS9MeXRrtKXvUPGQHITWzUdxtaWhYl x5slhVEhpcSxqiTpUuGvP8HYU8amX3KjuUkV0F/HdH1vmmVc7kFOxAG7 X-Gm-Gg: AYBFou2v/NHGI5IDa3oqWnCME/4G+VJ8soDaP7B+seR5O65ewunVT8bTruVykGwCtFs SDICE+IuA1ddo2e9H15F45iOkoadtIKrLPX3cWK0IrUoqOwc8bmtILwZ2tHR0V17sCMVuBJNGS/ U2G/KEWsFIjX0t29lRD3vLumVV0IoY/ic5ehjhPQ9gGs1YpAufkUhBC0zJ7FghIJRj7xaFCbnp/ +RxqafRmys5EB5AZi5BENp1c9lL7XQPrca6eObSTr4FHXyfmtI13Oz3R4Ts2Jl85IxmcbpqvKKv hg87VWppl5dkT7XjfUzvagjVBIQVQR/qlsRKw9y0lwgfqh0TQqs1CTu0Py6Auj/nL2vtuUcSoZn Lvb6QwstBzw/iNmITqnY6Ksko5cJchSV50afqesd7p7oY3zr1NUAZufH2mbMWvUtCIhszBkmNq5 XPfbuvse/j0xOvLywckfB/N4krvMV7CBmyyJHMWKXdChMElfQzgwrfVK2y2IBeEQIeadaqi3ODs G7Xi4l7pENloTvL99ajxkyaUeNcv4czsrlyHATzTiHKTID8BYqXOwHqvrhnvgIVINYemXx87+ri 5O62RU7NwT0t7IY= X-Received: by 2002:a05:622a:10c:b0:530:90a6:d28b with SMTP id d75a77b69052e-5309120facbmr96311061cf.8.1788901108599; Tue, 08 Sep 2026 13:58:28 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-5305413d7f8sm120945011cf.14.2026.09.08.13.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 13:58:27 -0700 (PDT) Date: Tue, 8 Sep 2026 15:58:25 -0500 From: Nathan Bossart To: Greg Burd Cc: Nazir Bilal Yavuz , KAZAR Ayoub , Neil Conway , Andrew Dunstan , Shinya Kato , pgsql-hackers Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD Message-ID: References: <78e736c8-7f4e-46c2-9fcf-a6839e393d64@app.fastmail.com> <9434f7bb-5865-4828-9f23-1dd30e50aaac@app.fastmail.com> <633c2a60-e5b9-49d2-a93d-946d184d946d@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <633c2a60-e5b9-49d2-a93d-946d184d946d@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Sep 08, 2026 at 11:58:42AM -0400, Greg Burd wrote: > The test writes one full input buffer (INPUT_BUF_SIZE, 65536 bytes) down a > COPY FROM PROGRAM pipe: a 65524-byte line, then a complete \. marker, then > 8 trailing bytes. That leaves 11 bytes unexamined when the SIMD path wants > to refill, which is under sizeof(Vector8) and already holds the whole > marker. The writer then dribbles a byte every 50ms and keeps the pipe open, > so a speculative load blocks rather than seeing EOF. statement_timeout > bounds the failure, so a regression fails the test instead of hanging the > suite. Skipped on Windows, where the blocking pipe and SIGPIPE behavior > isn't reliable. I'm not sure this particular corner case deserves its own TAP test. IMHO that is disproportionately expensive. It really only serves to prevent us from removing the backslash scan from the SIMD path, which I don't think we're likely to do. Furthermore, I'm not aware of any existing examples where a test writes and then invokes its own Perl script, and I can't get too excited about being the first to commit something like that. So, I'd prefer to leave this test out for now. If the new test fit cleanly into an existing suite or was less magical, I might be more eager to include it, but it's probably still unlikely to be worth the energy and maintenance risk. -- nathan