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 1jUDmB-0000QO-95 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2020 18:19:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDmA-0004R9-5o for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2020 18:19:10 +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 1jUDm9-0004R2-RW for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2020 18:19:09 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jUDm7-00024D-2p for pgsql-hackers@postgresql.org; Thu, 30 Apr 2020 18:19:09 +0000 Received: by mail-wr1-x444.google.com with SMTP id g13so8198236wrb.8 for ; Thu, 30 Apr 2020 11:19:06 -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:references:mime-version :content-disposition:in-reply-to; bh=lry3v/lb4yzzl7+HKPAzxki+MkQ0DAwQKUNgdl8+F6Q=; b=KVzCbADYeeS3zbV0iCNkcI+zcm00vKskXR0/W9/13RXCfckmr547nNW8MBFITg9A7d LuAjnh0b3xvMQh32fUf27xw7huj7GjD+QsZRGpAFefk6bLUTsteiDGfAsouaxgXrEVpr DmNC0Ncpn2cxbtHXykR8vKTxvsFKHoGjYR30fmifW1vFiBZlduJPSHvxB1lC/Wtbo5Hz 6niGgxVDi06LYvsRZAJMtwHbVYYWGJSwcgx6bG8OQk+HVAAp8TFu1i5Y0RNvQ07JerF/ sZIiJz2jYa53WOMdiJZ6BwWxoD/K7XMsBTeHnsMKTaXaSrEdnwwyvupBxU6K8K5O6aAe LWTA== 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:references :mime-version:content-disposition:in-reply-to; bh=lry3v/lb4yzzl7+HKPAzxki+MkQ0DAwQKUNgdl8+F6Q=; b=udKdCvPL4Q/5W3dAEdLH3RXaypgoNbR9e1Yua5CUWXQCIeXSSIJ9a4HgIcyk98G+xV /MlTXdgNX8VLg03fra5pS5H8FNO3twMWc9X5W9F3sNCKG/VKbiF8zmPOcXJo0pe6wlkn 6Lc6q5IN4PpX0PemXLqSCjgJmyTVNBkC95qxRrh1xnZgQtPZB3WMTWFCUiGBS5dPJtk0 54TtQLPxIl+GWrVAJW7PjmjQEfJuZHRvy9fBemFQ/2xaGBQeBj+otvgdQHIOLEZnl9kY 3IDeIxk7fdgaCBdAX58PRGt1kNRyWY/0f7ryOWxjMeqd/ijeqMTDk60F1fxYNPkdQquT COEQ== X-Gm-Message-State: AGi0PuYL0490l3KUXsNtKvkOM74XnIE6uCT3DE2I6ZrX7gbrpEZRuVaH yzYbguwRtp9x3++g+X6qq6/h1w== X-Google-Smtp-Source: APiQypLI0eZegyEdc6tUU1PEIhkLDqebpbX7q/qmjnB1h9+yrLaaXh3uaXJuJBF+90PBOp0VZbo1jg== X-Received: by 2002:a5d:544f:: with SMTP id w15mr5690687wrv.77.1588270744483; Thu, 30 Apr 2020 11:19:04 -0700 (PDT) Received: from localhost (ip-86-49-253-141.net.upcbroadband.cz. [86.49.253.141]) by smtp.gmail.com with ESMTPSA id r2sm586946wmg.2.2020.04.30.11.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 11:19:03 -0700 (PDT) Date: Thu, 30 Apr 2020 20:19:01 +0200 From: Tomas Vondra To: Fujii Masao Cc: Alvaro Herrera , Masahiko Sawada , "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" Subject: Re: SLRU statistics Message-ID: <20200430181901.24tlriahmafi4sfn@development> References: <20200229122441.ow7gnnqgesmojyc3@development> <20200229144426.GA32500@alvherre.pgsql> <20200229205518.xrxo535zgd7cl6no@development> <20200327004111.md4suoi6u5suv2qe@development> <20200328002630.2nz5y3dvymqnvxtv@development> <20200402004136.wodwftan45mcwggm@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, May 01, 2020 at 03:02:59AM +0900, Fujii Masao wrote: > > >On 2020/04/02 9:41, Tomas Vondra wrote: >>Hi, >> >>I've pushed this after some minor cleanup and improvements. > >+static char *slru_names[] = {"async", "clog", "commit_timestamp", >+ "multixact_offset", "multixact_member", >+ "oldserxid", "pg_xact", "subtrans", >+ "other" /* has to be last */}; > >When I tried pg_stat_slru, I found that it returns a row for "pg_xact". >But since there is no "pg_xact" slru ("clog" slru exists instead), >"pg_xact" should be removed? Patch attached. > Yeah, I think I got confused and accidentally added both "clog" and "pg_xact". I'll get "pg_xact" removed. >Regards, > >-- >Fujii Masao >Advanced Computing Technology Center >Research and Development Headquarters >NTT DATA CORPORATION >diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml >index 6562cc400b..ba6d8d2123 100644 >--- a/doc/src/sgml/monitoring.sgml >+++ b/doc/src/sgml/monitoring.sgml >@@ -3483,7 +3483,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i > predefined list (async, clog, > commit_timestamp, multixact_offset, > multixact_member, oldserxid, >- pg_xact, subtrans and >+ subtrans and > other) resets counters for only that entry. > Names not included in this list are treated as other. > >diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c >index 50eea2e8a8..2ba3858d31 100644 >--- a/src/backend/postmaster/pgstat.c >+++ b/src/backend/postmaster/pgstat.c >@@ -152,7 +152,7 @@ PgStat_MsgBgWriter BgWriterStats; > */ > static char *slru_names[] = {"async", "clog", "commit_timestamp", > "multixact_offset", "multixact_member", >- "oldserxid", "pg_xact", "subtrans", >+ "oldserxid", "subtrans", > "other" /* has to be last */}; > > /* number of elemenents of slru_name array */ -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services