Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0S7B-0001rt-3s for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 15:01:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0S79-00011s-Qa for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Aug 2019 15:01:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0S79-00011l-JM for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 15:01:31 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0S72-0003eu-Vt for pgsql-bugs@lists.postgresql.org; Wed, 21 Aug 2019 15:01:31 +0000 Received: by mail-qk1-x741.google.com with SMTP id 125so2082756qkl.6 for ; Wed, 21 Aug 2019 08:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=mP+xfEDylxU+L5anO6oERKAVJ5a2m+7qPT57hTsOf3w=; b=FR77SQt75rDoqLdcSzuKoYNRLGPX6lPBaLtkX+N23sv2GTtxaF5vaYAcrVHjGpoKOG 8bi69DmSr9qfDVFlqFg4Yz9qQeBRx06k4qMwv5r36Mr0gIu6axBquIQE82prD2V2tGDi lgjdQEpZy02p0wHrfCRPBtDEIEjqukIIHYkKtGLq1w/+VXfmhEERcnlCIkOisyIeyOte iyUHMUVmf1IHkN4Z393HsT/JqJK0n1st9DqnJlJAh4Aw5PmaxT/Mmocyx9tjXroET5U1 OVIaZ+jnRLAIr+xc+msU9OV2w6eEDk20WyhhCtxwduBk5+1unqJF5UNvdyFp3RCvhm0f dHMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mP+xfEDylxU+L5anO6oERKAVJ5a2m+7qPT57hTsOf3w=; b=VrNsc+RnKYY/+ue7jBVcnB73q59uBlNObv++p83k1NfIMOwm+4Yo/37uYYvywLXZ30 FwBNgOx0HiidTo3z29jZ9Bkd1u9e3AVRsQ3/7qYIpL1Tlcim5Goaczpi7MyMmnGRclUp RriA5XJ0vJ3bd7oxbOE2Q3sLYt1DE5Nxwn2XmOo7aReh1K2M71fUeyoZNuH9hI6jhaRk p0T98GwCmRrUs2HzKhQuHTptACwPUSizYirq7ciaIWtAEyzo0k3WSaOtYon6Vy5m1WxF ppUrmaDY8iXCmuJBWoHjVcgS55pwZZAu1vs45jnRegQKNE31dQ6Asu9NqDIQg479xPGq wkIg== X-Gm-Message-State: APjAAAXXGu/SXzzabLsqfK1sNsd+HESw6jCN5LgGQHvHMsoxrEUdlsME xkn2CqMAjAHbgNEAOrmJ/ue8re90iSU= X-Google-Smtp-Source: APXvYqwuU81Z01Egam1JePHviS8o0vhgFUmHctKkziAzOAmd51x2VQQ4CTITcJ63qHSmtLm2Ozz1zw== X-Received: by 2002:a37:6646:: with SMTP id a67mr32046438qkc.216.1566398092091; Wed, 21 Aug 2019 07:34:52 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.217.183.202]) by smtp.gmail.com with ESMTPSA id l80sm10144756qke.24.2019.08.21.07.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 07:34:51 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B405B120E96; Wed, 21 Aug 2019 10:34:49 -0400 (-04) Date: Wed, 21 Aug 2019 10:34:49 -0400 From: Alvaro Herrera To: Tom Lane Cc: Michael Paquier , Andres Freund , Dilip Kumar , jungleboogie0@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE' Message-ID: <20190821143449.GA27852@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30820.1566397711@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-21, Tom Lane wrote: > Alvaro Herrera writes: > > I guess the other possibility is that there exists an operating system > > that returns file descriptors higher than its FD_SETSIZE, when some fds > > below FD_SETSIZE are still available. Doesn't seem realistic. > > I think POSIX requires open() to select the lowest unused FD. Otherwise > tricks like closing and reopening stdout wouldn't work reliably. Ah, yes, that's right -- my system's open(3p) manpage says: The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services