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 1ttUtQ-00DBny-Sh for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Mar 2025 17:01:48 +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 1ttUsQ-00H9tC-Ba for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Mar 2025 17:00:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ttUsQ-00H9t4-1W for pgsql-hackers@lists.postgresql.org; Sat, 15 Mar 2025 17:00:46 +0000 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ttUsN-0030Ic-1r for pgsql-hackers@lists.postgresql.org; Sat, 15 Mar 2025 17:00:44 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4ZFSD52rzKz9sm9; Sat, 15 Mar 2025 18:00:37 +0100 (CET) Date: Sat, 15 Mar 2025 18:00:36 +0100 From: Christoph Berg To: Thomas Munro Cc: Quan Zongliang , PostgreSQL Hackers Subject: Re: Available disk space per tablespace Message-ID: References: <2df8509c-e28a-467a-8f03-f3cfe812ed62@yeah.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4ZFSD52rzKz9sm9 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Thomas Munro > > Hmm. Is looping on EINTR worth the trouble? > > I was just wondering if it might be one of those oddballs that ignores > SA_RESTART, but I guess that doesn't seem too likely (I mean, first > you'd probably have to have a reason to sleep or some other special > reason, and who knows what some unusual file systems might do). It > certainly doesn't on the systems I tried. So I guess not until we > have other evidence. Gnulib's get_fs_usage() (which is what GNU coreutil's df uses) does not handle EINTR either. There is some code that does int width expansion, but I believe we don't need that since the `fst.f_bavail * fst.f_frsize` multiplication takes care of converting that to int64 (if it wasn't already 64bits before). Christoph