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 1o95ac-000221-3m for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Jul 2022 14:01:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o95aa-0005Je-Nx for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Jul 2022 14:01:12 +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 1o95aa-0005Ha-Ex for pgsql-hackers@lists.postgresql.org; Wed, 06 Jul 2022 14:01:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o95aW-0001v1-LY for pgsql-hackers@postgresql.org; Wed, 06 Jul 2022 14:01:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 266E10532186604; Wed, 6 Jul 2022 10:01:00 -0400 From: Tom Lane To: Peter Eisentraut cc: Thomas Munro , Peter Geoghegan , Andres Freund , Noah Misch , Robert Haas , PostgreSQL Hackers Subject: Re: AIX support - alignment issues In-reply-to: <7890936c-392b-91be-edac-b6d5a500e4b9@enterprisedb.com> References: <20220702183354.a6uhja35wta7agew@alap3.anarazel.de> <968410.1656789743@sss.pgh.pa.us> <977853.1656794075@sss.pgh.pa.us> <1415825.1656893299@sss.pgh.pa.us> <1827177.1656996797@sss.pgh.pa.us> <7890936c-392b-91be-edac-b6d5a500e4b9@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Wed, 06 Jul 2022 15:02:15 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2186602.1657116060.1@sss.pgh.pa.us> Date: Wed, 06 Jul 2022 10:01:00 -0400 Message-ID: <2186603.1657116060@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > On 06.07.22 04:21, Thomas Munro wrote: >> /* >> * Do not try to collapse these into one "w+" mode file. Doesn't work on >> - * some platforms (eg, HPUX 10.20). >> + * some platforms. >> */ >> termin = fopen("/dev/tty", "r"); >> termout = fopen("/dev/tty", "w"); > I don't know how /dev/tty behaves in detail under stdio. I think > removing this part of the comment might leave the impression that > attempting to use "w+" will never work, whereas the existing comment > appears to indicate that it was only very old platforms that had the > issue. If we don't have an immediate answer to that, I'd leave the > comment as is. Yeah, I was kind of wondering whether we should give w+ a try now. IIRC, the code was like that at one point, but we had to change it (ie the comment comes from bitter experience). On the other hand, it's probably not worth the trouble and risk to change it again. regards, tom lane