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 1mrYnE-0000wf-Q1 for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Nov 2021 05:01:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mrYnD-0004M9-H5 for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Nov 2021 05:01:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrYnD-0004Lf-0Q for pgsql-bugs@lists.postgresql.org; Mon, 29 Nov 2021 05:01:31 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mrYn6-00083s-1v for pgsql-bugs@lists.postgresql.org; Mon, 29 Nov 2021 05:01:30 +0000 Received: by mail-il1-x12d.google.com with SMTP id w4so15982226ilv.12 for ; Sun, 28 Nov 2021 21:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mnMmJCdmomOSv4ikIAXd0HaVsOUClQb7U8+bytuRbFA=; b=EDJDRWMPrlgenb6BzWCzD3D8z/H3trHAOIwo7Quu3U2reJY+DS2YDKUGk8g44QxWem 2N2A7kGT75CwQkBuWlwjWwYFpHI/ogFFgiBOCcExdOz4EhOpQp/QBYWg1dQaASoyes3o cGrdEG8ouZRWPwIgZvx1LDq9Gqnb4aGGJQ3psgWGj0Fhlkk2sMeZ2kwqM+ACxeUSnHXV +OC1Ni4IIkibdcgtPcEr9qCh45+SBGfLRnhA6fL7PBiNOrKTmwDtggRIKLIVr8aXArXh vuCsykWnNBD79UqIaLKaQLveVG7u0lMXRm133s2krJMMLG/mezTSjyfNlfpACaj9kA18 WvDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mnMmJCdmomOSv4ikIAXd0HaVsOUClQb7U8+bytuRbFA=; b=3H2/VZMNQDQo/nduA1Bd9aZQxiCPwaWGh0T01AM8TdsgsecXcIkG4O6QaRQRSS6e/1 Tc/UPC9bEsWsGSXX7gnAMn3PpIHtsxYGVd+XEpqcXMlftUinf+FEexoGqfixQTpiaOen kiU75ooD1rFbEkYwLNv+nHg696Pr6MYgwm5u+zNRWUbFqswmdg41jDlIz3NsPfbaZl4I ZuXKH4KRBd8UYT011KiuNmR60LZBnmnkg4/tDkg3SFZjNgBGnKbv+V09cj5pHfsBR8Ol VROZz6osXJlTQcrltilPxJKtUyaes0/SI4SZcZqoqWbtDJ64uGZ3RNBUEHTlniBfCg1O o3bQ== X-Gm-Message-State: AOAM53312DhXBXUnfd9atlhJFRcUM+QpGcNCJeiRp9deFaJX4hSEJR4h 8mRK2UIWL7l5T5XeuA0yh5MsGQ== X-Google-Smtp-Source: ABdhPJx+YsNfMD0A8bdWXim9gD5rEq3rkuNUpAJRo32Bt3dicysSFqNkdM6ktNMvlflTOnqqc1jqIA== X-Received: by 2002:a05:6e02:11a7:: with SMTP id 7mr7825010ilj.315.1638162083260; Sun, 28 Nov 2021 21:01:23 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t12sm7043588ilp.8.2021.11.28.21.01.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Nov 2021 21:01:22 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 4B509800C52; Sun, 28 Nov 2021 23:01:22 -0600 (CST) Date: Sun, 28 Nov 2021 23:01:22 -0600 From: Justin Pryzby To: Michael Paquier Cc: Dmitry Koval , Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17288: PSQL bug with COPY command (Windows) Message-ID: <20211129050122.GK17618@telsasoft.com> References: <9caa0612-19e5-f860-4b97-908a1c721233@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Nov 25, 2021 at 12:23:41PM +0900, Michael Paquier wrote: > On Wed, Nov 24, 2021 at 10:44:09AM +0300, Dmitry Koval wrote: > > Unfortunately, you are. > > All my COPY-tests work well with files. > > I see a problem in the terminal only ... > > While checking all the callers of fstat() in the core code, I have > discovered that this broke a second case when stdout is not > redirected: pg_recvlogical -f -. In this case, the code would just > bump on EINVAL repeatedly instead of crashing, but equally broken it > was. There is a TAP test for this case in src/bin/pg_basebackup/, but > it would not trigger the problem per the redirection already done > there. > > Anyway, I have run more tests, tweaked slightly the comment, and > applied it down to 14. Thanks to both of you! Do you know this causes a new warning ? https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2021-11-29%2004%3A00%3A29 Nov 28 23:06:41 c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/port/win32stat.c:309:3: warning: implicit declaration of function 'GetFinalPathNameByHandleA'; did you mean 'GetFullPathNameA'? [-Wimplicit-function-declaration] ... -- Justin