Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrBbW-0004d3-H1 for pgsql-bugs@arkaria.postgresql.org; Sun, 28 Nov 2021 04:15:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mrBbV-00040b-DC for pgsql-bugs@arkaria.postgresql.org; Sun, 28 Nov 2021 04:15:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrBbT-00040S-VK for pgsql-bugs@lists.postgresql.org; Sun, 28 Nov 2021 04:15:53 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrBbP-0007gb-S4 for pgsql-bugs@lists.postgresql.org; Sun, 28 Nov 2021 04:15:51 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 71FC532007CF; Sat, 27 Nov 2021 23:15:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 27 Nov 2021 23:15:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=6i1b/PBLPPFhsC0QpNnOOx8015q 2het+ipVX2ihUULs=; b=XJs4EN5tmg1PKnIczdlc/Wkme2te03fEiX607JSUPny TfstwuIp8H+TkVcVqlsbR0dTf+2hWu4geafWEsus3PzFQU5IG3q8LidcdbUjPHDM L4bsk4RqTKxOHx3bj5xE3SPSDimTPrOQhoQboCZYzAFpQ/YyGFkI4bkQivTtbnN7 9k4u7mB9DrCGi1YLoBgjifRRzT8WSChtARQ7WtivnDezyda9WeLWtvXRy2JGTK1R 4t9NYBvHTCZAPCaU6xaqhVYpQcV39Ndxm5S1WERt7tqaL4VOj5lTGmRAVZngyC+o JuC8Duc85xtKXG5R5Q/XOEb6qq70rsuyTIcE02z1+Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=6i1b/P BLPPFhsC0QpNnOOx8015q2het+ipVX2ihUULs=; b=OiOva9iZY/QZ8yPZaNWG+S yUHhpgakyBr7UL2Ls5F33iv/POjXKWC3biX1V3OBjhK3qy1ZWxSLaYwxDDTLP75K IIbNMsHtUfromzdikC08ora7Tudh/ES+niLf0slmbPcOoyfVy4rvfa+unBWMXraZ iFLigqdB5iccFm+VHI/jD9ojYwcuQDQXEUhEGxbgUOxCmSQo4hKSjIYsb0WjWomF uby3cYS7LuT9Iul2UK0Z8eNYuGNJKcXbVD7hvmM1E6S7tB+fnXwhAAPKlnh1FGeH FeG6yWTdTJkNRlAnRo+tNw5PW72y9nEzZKJxVO6AerqduKL/NYQIu2npUiivNiAw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrheehgdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddu necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvedtgfekudduueevteefgefgjedu vddtteeuhfelueffueekiefhjefgieegudelnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 27 Nov 2021 23:15:40 -0500 (EST) Date: Sun, 28 Nov 2021 13:15:36 +0900 From: Michael Paquier To: Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha Cc: Dmitry Koval , PostgreSQL mailing lists Subject: Re: BUG #17288: PSQL bug with COPY command (Windows) Message-ID: References: <9caa0612-19e5-f860-4b97-908a1c721233@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/Uxo8NJxHCR5f6HF" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --/Uxo8NJxHCR5f6HF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 26, 2021 at 01:37:49PM +0100, Juan Jos=E9 Santamar=EDa Flecha w= rote: > through a tap test using console input. Looking at the patch I'm not sure > it is worth all the extra code, but I'm submitting it for future reference > at least. + eval { + $result =3D IPC::Run::run [ 'psql', '-p', $port, '-c', "\\copy public.test from stdin", 'postgres' ], + IPC::Run::timeout( 1, name =3D> "stall timeout" ); Using directly psql commands in the tests is not a good idea as it makes the client-side execution more sensitive to the environment. src/test/perl/PostgreSQL/Test/Cluster.pm does the same work, in the wanted way, so it would be better to rely on it (see 384f1ab for one recent issue). A test with a minimal timeout also takes time, making for slower tests on faster machines. Hmm. Do you think that a test based on Cluster::psql and stdout would actually be able to do the work or would the redirection done in the INIT block of Utils.pm prevent that? Contrary to the code path of pg_recvlogical, Cluster::psql would use directly IPC::Run, and not redirect stdout to the test log file. I would stick a test in one of the existing test suites, to not create an extra cluster and reduce its run time. -- Michael --/Uxo8NJxHCR5f6HF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmGjAmgACgkQnvQgOdby QH3OzA/9EXsS0IZAszR5N4Qjv0JGBcSJMfJEavEzigPQrbmHS7LODo/lHEiy4pyr ZRRd7jnGnY+1id9lRWr01WPfGRLq50xJszZToQRjHCERu8nJaeHd0QXstdvQdKgU VjkDENCOmIfkk1QmXQXh7d1XdqhrFLd7+sUWWfMQYGB4drOJMm6FQuJAv3Am1sHQ OrUiDkEMig3K2F9BSgn1gTW+XtDZjO0L3VaymRU33C+JQHX69qaBgkLAMT+eK8Uc 69HJlsu+tf4lZKUSR4l6zOm3vdKkt44Q1JxW6/PspslQHv2WZQ6J9DxXroMnRNdk jGmI/qKIQJf8Cps+8jTiZXTwVg3su0PghJsbhRAMEjoii7VjhZURX1SPLGcXxQX9 xKNPxF3vAM0iNUkvIAiyX2iTWg1CTI5qc1iSxaySxZWCXDcX4+vcbMqm6JEI7b0D 4ulnon5l/tsKMjroLQg83QD1VL8vxVc2PpfavODbHpWozsInDE67NnmXqZalyI8K l2s9ivd1dbByyYIPf/Zb2PWm+rumFcTtp3HMKLAKUAhYdUDOlCR28X3YFfKYYXsQ e5uPMBk9kNLE30r8cvDeTRUwLRhFPyTxktEJScERLINO4BDjbTZy4vg+wwzH7zmD vg2bzhH2Gpy+HQc2WtZnAkdpTbnQwXsISPWElfP/ybHuVJPL/gE= =D9lP -----END PGP SIGNATURE----- --/Uxo8NJxHCR5f6HF--