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 1lTeLq-0006h7-Fi for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 05:34:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTeLo-00012U-Mj for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Apr 2021 05:34:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTeLo-00012N-Fv for pgsql-hackers@lists.postgresql.org; Tue, 06 Apr 2021 05:34:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTeLl-0002de-QI for pgsql-hackers@postgresql.org; Tue, 06 Apr 2021 05:34:08 +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 1365Y24X949195; Tue, 6 Apr 2021 01:34:02 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: subtransaction performance regression [kind of] due to snapshot caching In-reply-to: <20210406052358.cqrz2eav6wnhskjl@alap3.anarazel.de> References: <20210406043521.lopeo7bbigad3n6t@alap3.anarazel.de> <947172.1617684433@sss.pgh.pa.us> <20210406052358.cqrz2eav6wnhskjl@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 05 Apr 2021 22:23:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <949193.1617687242.1@sss.pgh.pa.us> Date: Tue, 06 Apr 2021 01:34:02 -0400 Message-ID: <949194.1617687242@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2021-04-06 00:47:13 -0400, Tom Lane wrote: >> Not wanting to distract from your point about xactCompletionCount, >> but ... I wonder if we could get away with defining "isObjectPinned" >> as "is the OID <= 9999" (and, in consequence, dropping explicit pin >> entries from pg_depend). I had not previously seen a case where the >> cost of looking into pg_depend for this info was this much of the >> total query runtime. > Couldn't we also treat FirstGenbkiObjectId to FirstBootstrapObjectId as > pinned? That'd be another 400kB of database size... Yeah, it'd require some close study of exactly what we want to pin or not pin. Certainly everything with hand-assigned OIDs should be pinned, but I think there's a lot of critical stuff like index opclasses that don't get hand-assigned OIDs. On the other hand, it's intentional that nothing in information_schema is pinned. We might have to rejigger initdb so that there's a clearer distinction between the OID ranges we want to pin or not. Maybe we'd even get initdb to record the cutoff OID in pg_control or someplace. Anyway, just idle late-night speculation for now ... regards, tom lane