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 1t8Kvt-003YEp-V0 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Nov 2024 14:53:25 +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 1t8Kvr-00ETvs-8r for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Nov 2024 14:53:23 +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.94.2) (envelope-from ) id 1t8Kvq-00ETvj-Um for pgsql-hackers@lists.postgresql.org; Tue, 05 Nov 2024 14:53:23 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t8Kvn-000KwI-Rj for pgsql-hackers@lists.postgresql.org; Tue, 05 Nov 2024 14:53:22 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2e30116efc9so4397240a91.2 for ; Tue, 05 Nov 2024 06:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timescale.com; s=google; t=1730818399; x=1731423199; 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=K4viGTsybK3vnwA3clXm4nWl9JdmToEmexAemCqa56I=; b=NkXZmPHacwEtPCL7sLN+ejIE86e95Aw99t5iSEV+DBrZrwiY/ICgbrsLcQtXRgZWf7 /mok59LNRzj4TwaDBMJK4skIZJw/FeTWMjSjM6HxIa94ZUlRr8XLvl6pVf42JIomjicr Q8QNBWQiOHDwZp1c30hLyYkCtPlBsRVdNz5ggjQIGoa0I7ziHx5VeH1b/nAbAVTLID+8 ycjzizNPan0Y5lveF3TmqFud3PxEOmAT+cwbaifFro2RE8KaQvCcRR/nyIbZb8Y5Habg u8cfSuwp1biOqUJLCmT4alxVGFcjR6w4DLg8X1rDSbLf2POTl8anYUAcPm4la2fcNigB bZaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730818399; x=1731423199; 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=K4viGTsybK3vnwA3clXm4nWl9JdmToEmexAemCqa56I=; b=B7XfJrYSiNg5nS3+x5ErGT1VpNyoqH5vmdPyuLEmlPnZUkaDG8IZag/JnOcHVeu6Ab grJ49IdcS5zcPR9cfIQl9d+05p0hAwKcIpmsDZ1bmvtyKroWgcJy97G3JdyBrCQcJYf2 kEywV4i0KEfQjmPKBzuSM2EC/XI5qkA1CePhRPAbaZzymaVZdEKLQRUpN55zfc15fF5j qPR90p98TrdXJHtJzyjF35BVwsn/Tn6kPsifXLEJxPId9T6aK86JqpaC9pGp2Kz+8uAo +iWUIAdsrx68tMkvGCI4cRcurKARMPkZA2+ksOZh9AumkbGcbwVhcP+BLrkdsflfpj2k 7WCg== X-Gm-Message-State: AOJu0YzaRyD0cXXp0b+3XdebDszwk1CSWo2oru/cDzedXIx/bqGVIgPd oUkrU621k7eEhgiMetMvIUwt+r/LGQM92PZZ5LVKhnm7sWnJAoioXMIAOrNknEnHWPnBtVO1gk9 iV4wsZR4jHTIq/SacGtYvaG8Zmtwrf4b6vpHNIg== X-Google-Smtp-Source: AGHT+IEa+2VDuh/7Wt+cWVOjwvrkXPrcO7Mo21irqrQS0UCNCZn1kL20HubgQfGHvRkJc6H68HC8GEsxw1bVwh59zO8= X-Received: by 2002:a17:90a:f406:b0:2e0:d693:7884 with SMTP id 98e67ed59e1d1-2e8f0f55a2bmr40364661a91.5.1730818398831; Tue, 05 Nov 2024 06:53:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aleksander Alekseev Date: Tue, 5 Nov 2024 17:53:07 +0300 Message-ID: Subject: Re: COPY performance on Windows To: "Ryohei Takahashi (Fujitsu)" Cc: "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Ryohei, Thanks for the patch. Here are my two cents. > I noticed that the COPY performance on PG 17.0 Windows is worse than PG 16.4. > > [...] > > By applying the attached patch to PG 17.0, the copy result is 401.5s. So we are trading a potential 3.8% speedup in certain environments for the increased code complexity due to a couple of added #ifdef's here. If we really want to do this, firstly the patch should have detailed comments in front of #ifdefs so that in 10+ years from now someone who didn't read this thread would know what they are for. Secondly, more detailed research should be made on how this patch affects the performance on Windows depending on the software version and particular choice of hardware. Perhaps what you found is not the only and/or the most important bottleneck. Your patch may (or may not) cause performance degradation in other setups. Last but not least one should double check that this will not cause performance degradation on *nix systems. To be honest, personally I wouldn't bother because of 3.8% speedup at best (for 10+% - maybe). This being said perhaps you and other people on the mailing list (reviewers, committers) feel otherwise. -- Best regards, Aleksander Alekseev