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 1tpcRJ-0094pF-Po for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Mar 2025 00:16:45 +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 1tpcRI-00CVQX-9o for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Mar 2025 00:16:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tpcRH-00CVPr-W1 for pgsql-hackers@lists.postgresql.org; Wed, 05 Mar 2025 00:16:44 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tpcRD-000zw1-0L for pgsql-hackers@lists.postgresql.org; Wed, 05 Mar 2025 00:16:43 +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 5250GXUO210866; Tue, 4 Mar 2025 19:16:33 -0500 From: Tom Lane To: Andrew Dunstan cc: Andres Freund , Tomas Vondra , Jakub Wartak , Robert Haas , PostgreSQL Hackers Subject: Re: scalability bottlenecks with (many) partitions (and more) In-reply-to: <52fccecc-0bce-4317-b485-7eb77c8bd9e6@dunslane.net> References: <7c1eeafb-2375-4ff6-8469-0640d52d44ed@vondra.me> <5xahykogf2sg3ofdqk2li7xx3t2vh23m42jnvfwxoi5fhh7iya@girlhoxdxjzc> <486baeb2-2adc-48d2-ba9d-13c4ae43301c@vondra.me> <733e72fa-5fc2-48fc-ab1f-1d8f1ab387c3@vondra.me> <193453.1741123834@sss.pgh.pa.us> <197167.1741125678@sss.pgh.pa.us> <8a1a5c10-0644-4ea0-a9e8-73d3a2908e18@dunslane.net> <200085.1741127335@sss.pgh.pa.us> <52fccecc-0bce-4317-b485-7eb77c8bd9e6@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Tue, 04 Mar 2025 18:25:53 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <210864.1741133793.1@sss.pgh.pa.us> Date: Tue, 04 Mar 2025 19:16:33 -0500 Message-ID: <210865.1741133793@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2025-03-04 Tu 5:28 PM, Tom Lane wrote: >> ... I eventually concluded that there's >> something wrong with the "scalar glob()" idiom you used. > Well, in scalar context it should give us back the first item found, or > undef if nothing is found, AIUI. That's what I would have thought too, but it didn't seem to work that way when I was testing the logic standalone: the script processed or skipped directories according to no rule that I could figure out. Anyway, for the moment I think we're all right with just the directory path fix. regards, tom lane