Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKclW-0005W5-4Y for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Dec 2017 04:17:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKclV-0007tg-CV for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Dec 2017 04:17:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eKclV-0007tW-30 for pgsql-hackers@lists.postgresql.org; Fri, 01 Dec 2017 04:17:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eKclO-0003Oq-D8 for pgsql-hackers@postgresql.org; Fri, 01 Dec 2017 04:17:27 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vB14HB5N002274; Thu, 30 Nov 2017 23:17:11 -0500 From: Tom Lane To: Robert Haas cc: Michael Paquier , Kyotaro HORIGUCHI , David Steele , Jim Nasby , Craig Ringer , PostgreSQL mailing lists Subject: Re: Protect syscache from bloating with negative cache entries In-reply-to: References: <6eb3b24b-c0eb-b8ca-f847-609704e2a370@pgmasters.net> <3b7b7f90-db46-8c37-c4f7-443330c3ae33@pgmasters.net> <20170317.142313.232290068.horiguchi.kyotaro@lab.ntt.co.jp> <20171031.184622.92520047.horiguchi.kyotaro@lab.ntt.co.jp> <84820.1512015443@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 30 Nov 2017 11:11:07 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <85586.1512101829.1@sss.pgh.pa.us> Date: Thu, 30 Nov 2017 23:17:09 -0500 Message-ID: <85587.1512101829@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Wed, Nov 29, 2017 at 11:17 PM, Tom Lane wrote: >> The thing that makes me uncomfortable about this is that we used to have a >> catcache size limitation mechanism, and ripped it out because it had too >> much overhead (see commit 8b9bc234a). I'm not sure how we can avoid that >> problem within a fresh implementation. > At the risk of beating a dead horse, I still think that the amount of > wall clock time that has elapsed since an entry was last accessed is > very relevant. While I don't object to that statement, I'm not sure how it helps us here. If we couldn't afford DLMoveToFront(), doing a gettimeofday() during each syscache access is surely right out. regards, tom lane