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 1o3E6A-0004MH-HA for pgsql-general@arkaria.postgresql.org; Mon, 20 Jun 2022 09:53:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o3E69-0007pV-63 for pgsql-general@arkaria.postgresql.org; Mon, 20 Jun 2022 09:53:33 +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 1o3E68-0007of-Q3 for pgsql-general@lists.postgresql.org; Mon, 20 Jun 2022 09:53:32 +0000 Received: from mail.credativ.com ([93.94.130.90]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3E65-0000NP-Qy for pgsql-general@postgresql.org; Mon, 20 Jun 2022 09:53:31 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.credativ.com (Postfix) with ESMTP id B786020BD5; Mon, 20 Jun 2022 09:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=credativ.de; s=email; t=1655718806; bh=VfPu6HxDl6zJD1YrJvF/7te3msYK+laEkGOtre8nOMg=; h=Date:From:To:Subject:From; b=Hj6aM5Yfgdta0tAz01zIQrZFIrzh8mmaGr4I5JzoLm7jwsYE5Zy7TLHCuTGdkGMTr ybaciF95qOQ0FeEJRGPDGA/+fGTtxiW69OD7W6xEOhAWAlMkn9TuN3fPIsEeQjZr1h F11Z69EbOS8S5j84S5IY19QGeL1J6/ZvL+lN4PcIKOUVWyv6fMKRsa21d6dyCQMoJp 1GX2393XqDiy1QPGH4yPp6EmrP1HDP/o5ln3ZOEFGCzTFPD0DL1wWFp+JSIgt33M/0 aoXLqGIHa8AwrMGLRNKFXOElrt+XUQvJkerjblDHFRd+lODVwOK/u1KS9Zr+Fe50Xs 3lQb5netbWqNA== Received: from mail.credativ.com ([127.0.0.1]) by localhost (mail.credativ.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EXQ8IB5JH_Mj; Mon, 20 Jun 2022 09:53:20 +0000 (UTC) Received: from msg.credativ.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cbe) by mail.credativ.com (Postfix) with ESMTPSA id 955E820405 for ; Mon, 20 Jun 2022 09:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=credativ.de; s=email; t=1655718800; bh=VfPu6HxDl6zJD1YrJvF/7te3msYK+laEkGOtre8nOMg=; h=Date:From:To:Subject:From; b=l1FIIyl8Z4XEDX10XdLkKnN432VMvJHWHAc1xI2uIxbnfpkglSgDQY+lxjdxrKR/l Z1Kr8W7wydZdqQYAIen77pJMtXH/IUlziJdm/oyUH2z8RcqywXeqk93i8lZ00gdo5X HOawQoLjjKZ6JwpqpcNLRtJCdN4yF3z2THjoostxZ3C462wnXpDPXiX51jZyJ5jX8z QAhphbauxFWwvSp7HMzFDyNgY0qPc5IevpC8tgss1uSm24XHOWhEgqUPLURTjzUrLr tIDqMuTnkN+Laxi7yiwLz6Cc59uXfgSDQhaC/yQ4qr0lIgKXArTohWCpq5r0ydT/Jd LaJf6jPetMn5Q== Date: Mon, 20 Jun 2022 11:53:20 +0200 From: Christoph Berg To: PostgreSQL Subject: AIX and EAGAIN on open() Message-ID: Mail-Followup-To: Christoph Berg , PostgreSQL MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, a customer running PG on AIX [1] is occasionally seeing "Resource temporarily unavailable" (EAGAIN) returned by open() calls: [1] We have PostgreSQL 11.13 on powerpc-ibm-aix7.2.5.0, compiled by /opt/IBM/xlc/13.1.0/bin/xlc, 64-bit 2022-05-19 03:28:13 CEST:127.0.0.1(63265):x@x:[64029168]: ERROR: could not open file "base/16401/935915821_fsm": Resource temporarily unavailable 2022-05-19 03:28:13 CEST:127.0.0.1(63265):x@x:[64029168]: CONTEXT: SQL statement "INSERT INTO s[...]" PL/pgSQL function s...() line 12 at SQL statement 2022-05-19 03:28:13 CEST:127.0.0.1(63265):x@x:[64029168]: STATEMENT: PREPARE ... AS insert into ... 2022-04-16 01:45:31 CEST:127.0.0.1(58946):x@x:[20906970]: ERROR: could not access status of transaction 0 2022-04-16 01:45:31 CEST:127.0.0.1(58946):x@x:[20906970]: DETAIL: Could not open file "pg_subtrans/6158": Resource temporarily unavailable. 2022-04-16 01:45:31 CEST:127.0.0.1(58946):x@x:[20906970]: STATEMENT: PREPARE ... AS update ... 2020-12-01 09:24:30 CET:127.0.0.1(59898):x@x:[6227520]: ERROR: could not access status of transaction 0 2020-12-01 09:24:30 CET:127.0.0.1(59898):x@x:[6227520]: DETAIL: Could not open file "pg_subtrans/AC9E": Resource temporarily unavailable. 2020-12-01 09:24:30 CET:127.0.0.1(59898):x@x:[6227520]: STATEMENT: PREPARE ... AS DELETE FROM .... open() should not return EAGAIN as per POSIX [2], [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html#tag_16_357_05 and the AIX documentation says it would only return EAGAIN if O_TRUNC is used [3], but as far as I can tell, PG does not use that flag. [3] https://www.ibm.com/docs/en/aix/7.2?topic=o-open-openat-openx-openxat-open64-open64at-open64x-open64xat-creat-creat64-subroutine IBM's reply to the issue back in December 2020 was this: The man page / infocenter document is not intended as an exhaustive list of all possible error codes returned and their circumstances. "Resource temporarily unavailable" may also be returned for O_NSHARE, O_RSHARE with O_NONBLOCK. Afaict, PG does not use these flags either. We also ruled out that the system is using any anti-virus or similar tooling that would intercept IO traffic. Does anything of that ring a bell for someone? Is that an AIX bug, a PG bug, or something else? Christoph -- Senior Consultant, Tel.: +49 2166 9901 187 credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Geoff Richardson, Peter Lilley Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen: https://www.credativ.de/datenschutz