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 1guffJ-0006PH-A6 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 15:44:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1guffH-0003Oz-OD for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 15:44:35 +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 1guffH-0003Os-AS for pgsql-hackers@lists.postgresql.org; Fri, 15 Feb 2019 15:44:35 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guffE-0006eq-GL for pgsql-hackers@lists.postgresql.org; Fri, 15 Feb 2019 15:44:34 +0000 Received: by mail-wr1-x42d.google.com with SMTP id c8so10811380wrs.4 for ; Fri, 15 Feb 2019 07:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=u1AQVCvf0k6tS/Obp4wu1xpldSUH+l0SoY8SrRvF/qU=; b=bG71bJn1EQ6GwaHMlAzOM7XAv3w/mnpnmwD6VE0DHxXaDpIzDa2JIrsJE+0fmzFpdQ 0kEF2+p0ylXoz+19RoO+qxuh7LjhAJNYUTpfw4AyzfrieO+UW3QBJ4Cqxyb/MHYgp9JB zTtaXFUq/YiJC+HGqh7NERfQ+EdyXt+QHCkOdSNK752oDeFtLxZhXUwcacrVN1qlriVd lvsMr7s3VH5NZmBHQjyOjaumwKEhzcyXNdsNn3dMU57UY2dM3Z8iEHteZmfS5JbN6rri pzLZgKrupH2ylRaogJuf6WSWpf/X4WADmPE3d/bmKQxEclt0VTij07jZOdScm35+Zbpl 7MiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u1AQVCvf0k6tS/Obp4wu1xpldSUH+l0SoY8SrRvF/qU=; b=T9yE9/Xwc2Vc4sPoDrRVnieGTl6zCBBYVyFEGxktbHlKpjK77QhvOJ799eg0Rp98j/ jR6S/tAPS3RjZUCfBIxNnfo+XjhtZNJVtjEmgLFMhS8iCsq9g1vgqqnMKG/BHDALrQrk kjsF9bgv3JE4ZqpdjAkOjWuf5L1Gay2B/Yk73X6ofq0ZuOQDjzeGXkWAnGO5Iyt8hawJ /csPNhdVPgn/cO4wP/OTYgJQQjlP0OvzJzxNqtfwdGpFtkC8Y2Z/fauYQHuC04jffKua RwEeJ2LfTMPhxdHCs26J/e81fhFr3Q3GzrE08WzrNMrNIaOuRDTr5IDWBoBEoHpybOnV HohQ== X-Gm-Message-State: AHQUAua5/A979Pbw7y98Wf2Y85KGuzNwrmHbdNGd4yR9dEXFKgNZm7UP KQb4YFTW7O50YBBcbE75igYrHw== X-Google-Smtp-Source: AHgI3IZ8VEBbOPJltTCgELKGPAM81eHEn+OrROnTXGhRPmgnyp/nYG/S3wQ85Ev97j0bTUoNzFHgMA== X-Received: by 2002:adf:b611:: with SMTP id f17mr7919179wre.140.1550245470510; Fri, 15 Feb 2019 07:44:30 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-246-90.net.upcbroadband.cz. [86.49.246.90]) by smtp.gmail.com with ESMTPSA id h137sm14864wmg.41.2019.02.15.07.44.28 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 07:44:29 -0800 (PST) Subject: Re: Protect syscache from bloating with negative cache entries To: "Tsunakawa, Takayuki" , 'Kyotaro HORIGUCHI' Cc: "alvherre@2ndquadrant.com" , "bruce@momjian.us" , "andres@anarazel.de" , "robertmhaas@gmail.com" , "tgl@sss.pgh.pa.us" , "Ideriha, Takeshi" , "pgsql-hackers@lists.postgresql.org" , "michael.paquier@gmail.com" , "david@pgmasters.net" , "craig@2ndquadrant.com" References: <20190207.152418.139132570.horiguchi.kyotaro@lab.ntt.co.jp> <20190207.211845.263152487.horiguchi.kyotaro@lab.ntt.co.jp> <74386116-0bc5-84f2-e614-0cff19aca2de@2ndquadrant.com> <20190212.203510.100151050.horiguchi.kyotaro@lab.ntt.co.jp> <0A3221C70F24FB45833433255569204D1FB97B80@G01JPEXMBYT05> From: Tomas Vondra Message-ID: <46935902-7753-6235-690f-2ce657ae2a5f@2ndquadrant.com> Date: Fri, 15 Feb 2019 16:44:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <0A3221C70F24FB45833433255569204D1FB97B80@G01JPEXMBYT05> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/13/19 1:23 AM, Tsunakawa, Takayuki wrote: > From: Kyotaro HORIGUCHI [mailto:horiguchi.kyotaro@lab.ntt.co.jp] >> I'm at a loss how call syscache for users. I think it is "catalog >> cache". The most basic component is called catcache, which is >> covered by the syscache layer, both of then are not revealed to >> users, and it is shown to user as "catalog cache". >> >> "catalog_cache_prune_min_age", "catalog_cache_memory_target", (if >> exists) "catalog_cache_entry_limit" and >> "catalog_cache_prune_ratio" make sense? > > PostgreSQL documentation uses "system catalog" in its table of contents, so syscat_cache_xxx would be a bit more familiar? I'm for either catalog_ and syscat_, but what name shall we use for the relation cache? catcache and relcache have different element sizes and possibly different usage patterns, so they may as well have different parameters just like MySQL does. If we follow that idea, then the name would be relation_cache_xxx. However, from the user's viewpoint, the relation cache is also created from the system catalog like pg_class and pg_attribute... > I think "catalog_cache_..." is fine. If we end up with a similar patchfor relcache, we can probably call it "relation_cache_". I'd be OK even with "system_catalog_cache_..." - I don't think it's overly long (better to have a longer but descriptive name), and "syscat" just seems like unnecessary abbreviation. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services