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 1pZ4H1-00012k-VR for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 06:24:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZ4H0-0001E3-Cx for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 06:24:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZ4H0-00018n-0V for pgsql-hackers@lists.postgresql.org; Mon, 06 Mar 2023 06:24:38 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZ4Gs-0004fN-TK for pgsql-hackers@postgresql.org; Mon, 06 Mar 2023 06:24:36 +0000 Received: by mail-pj1-x102a.google.com with SMTP id ce8-20020a17090aff0800b0023a61cff2c6so6861666pjb.0 for ; Sun, 05 Mar 2023 22:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678083870; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=APgriVKhPSESlzMLJ3kpA0r11kJ1pmn0AzYOEAU5JaA=; b=GIXGg0kXK98BSvSBHFWFWACWl8A7RRXBsfzv3mWoVeT1AwbZCpj3+HRsYJIv/kgQji emvVHDm/vKwbaIOBi/fa0efSsKACBZp3RuQPoO4hNCqP0/dsyDQlXB4oR8jefaGf4TCA vSpU43TK2VwBR1vIPZ2wcIdm5NebGQAiylNShn3d0e0xv5zC4+z8P1K7xTSRSrlluupq E/Urw/cPvKlAQqoCt2WcdsNGveWsv8jL+bIOEWMCJo6VOi4XEzolt9I9nx0RdW/WvCDw icuuvYE+ki+AnDmxgKrq9VcLoYnlIApJj4Eyu2ZdgqwIgmIuxJxVGPDNbnic6LGnhfV4 CR6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678083870; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=APgriVKhPSESlzMLJ3kpA0r11kJ1pmn0AzYOEAU5JaA=; b=dJfZOTJwrlP7/afHhx66UZIhMuyKBj0k51GALKNds+WuzwlV+HnqoH7mVBwqjjnTFA I7rPsZ888Yjbxw50A8CkMkusMbaAWM3sUy++4nbD6edRXbpLAwy+VzuVactZ65PPdMQn xL5n1ICgEOfJJQ82M4tZGwZ5IJuJXL1NvBkO9drGmJdGICL/cdZBhsQT5YIBEbU3gDkM B1+LLA7zI4BBLJBTumH+qDT442tvSWt/RAkimED77m6gC7ydIYRK7Ev2FtPZKWPUKs+v 7/yz6zLNgiS6xuFDuD37c/SbT9vKGTs7hafKcNkiJX5iJirPSjgFtkBHei82URU9TUis Mc4A== X-Gm-Message-State: AO0yUKVD/v1R/q6sNouaidpEKJViOqqT7Vxmc38DbUJTrCGERlh7gULT y/tNn1Vl9WgMFg4HEd4GrSs= X-Google-Smtp-Source: AK7set/ATZ2sb6QIbqRUyAEbk7fOQikQU2A7vAHcJ4TyPSWRXgwimYr/AuOxauO2Rb1sXSRsRj6fGw== X-Received: by 2002:a05:6a20:9150:b0:b9:7de5:239 with SMTP id x16-20020a056a20915000b000b97de50239mr10791583pzc.27.1678083869556; Sun, 05 Mar 2023 22:24:29 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id q21-20020a63d615000000b005030a00085asm5467451pgg.46.2023.03.05.22.24.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 05 Mar 2023 22:24:29 -0800 (PST) Date: Mon, 06 Mar 2023 15:24:25 +0900 (JST) Message-Id: <20230306.152425.316894602450485455.horikyota.ntt@gmail.com> To: tgl@sss.pgh.pa.us Cc: andres@anarazel.de, melanieplageman@gmail.com, vignesh21@gmail.com, pryzby@telsasoft.com, lukas@fittl.com, alvherre@alvh.no-ip.org, magnus@hagander.net, pgsql-hackers@postgresql.org, thomas.munro@gmail.com, m.sakrejda@gmail.com Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) From: Kyotaro Horiguchi In-Reply-To: <3039228.1677972069@sss.pgh.pa.us> References: <20230209050319.chyyup4vtq4jzobq@awork3.anarazel.de> <20230211182437.ype5tk3awen2htvw@awork3.anarazel.de> <3039228.1677972069@sss.pgh.pa.us> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Sat, 04 Mar 2023 18:21:09 -0500, Tom Lane wrote in > Andres Freund writes: > > Just pushed the actual pg_stat_io view, the splitting of the tablespace test, > > and the pg_stat_io tests. > > One of the test cases is flapping a bit: > > diff -U3 /home/pg/build-farm-15/buildroot/HEAD/pgsql.build/src/test/regress/expected/stats.out /home/pg/build-farm-15/buildroot/HEAD/pgsql.build/src/test/regress/results/stats.out > --- /home/pg/build-farm-15/buildroot/HEAD/pgsql.build/src/test/regress/expected/stats.out 2023-03-04 21:30:05.891579466 +0100 > +++ /home/pg/build-farm-15/buildroot/HEAD/pgsql.build/src/test/regress/results/stats.out 2023-03-04 21:34:26.745552661 +0100 > @@ -1201,7 +1201,7 @@ > SELECT :io_sum_shared_after_reads > :io_sum_shared_before_reads; > ?column? > ---------- > - t > + f > (1 row) > > DROP TABLE test_io_shared; > > There are two instances of this today [1][2], and I've seen it before > but failed to note down where. The concurrent autoanalyze below is logged as performing at least one page read from the table. It is unclear, however, how that analyze operation resulted in 19 hits and 2 reads on the (I think) single-page relation. In any case, I think we need to avoid such concurrent autovacuum/analyze. https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=grison&dt=2023-03-04%2021%3A19%3A39 2023-03-04 22:36:27.781 CET [4073:106] pg_regress/stats LOG: statement: ALTER TABLE test_io_shared SET TABLESPACE regress_tblspace; 2023-03-04 22:36:27.838 CET [4073:107] pg_regress/stats LOG: statement: SELECT COUNT(*) FROM test_io_shared; 2023-03-04 22:36:27.864 CET [4255:5] LOG: automatic analyze of table "regression.public.test_io_shared" avg read rate: 5.208 MB/s, avg write rate: 5.208 MB/s buffer usage: 17 hits, 2 misses, 2 dirtied 2023-03-04 22:36:28.024 CET [4073:108] pg_regress/stats LOG: statement: SELECT pg_stat_force_next_flush(); 2023-03-04 22:36:28.024 CET [4073:108] pg_regress/stats LOG: statement: SELECT pg_stat_force_next_flush(); 2023-03-04 22:36:28.027 CET [4073:109] pg_regress/stats LOG: statement: SELECT sum(reads) AS io_sum_shared_after_reads FROM pg_stat_io WHERE io_context = 'normal' AND io_object = 'relation' > [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=grison&dt=2023-03-04%2021%3A19%3A39 > [2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mule&dt=2023-03-04%2020%3A30%3A05 regards. -- Kyotaro Horiguchi NTT Open Source Software Center