Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viKzy-003VHz-2F for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 23:18:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viKzx-0040hZ-2m for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 23:18:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viKzx-0040hR-1h for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 23:18:57 +0000 Received: from mail-yx1-xb12a.google.com ([2607:f8b0:4864:20::b12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1viKzv-001bly-1O for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 23:18:57 +0000 Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-646fe7f70e2so4547354d50.0 for ; Tue, 20 Jan 2026 15:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768951133; cv=none; d=google.com; s=arc-20240605; b=eCwxGVEC8cn2a9ZoL7Yy03caYPK1q5h6wawekVt6iI/EJP6nQs0p6Vuw7dBqNiuJNH Nl+1YWyVTdTwh5rI6LbRmCs7oo86/Ay8yAnGjnEuHbE4idyW2nxfLxy+ODo1d52LVJZ9 OaFsxi3QpGl0dbVWD3mCRTuZEWH3cA8TYuU4oLooEF3pVJCELpB48mtNztz3sO6lbvNC ien5tlU91DtejKPRuVKJ7BZkmfGv2MfbQnZUwQBR6XJA3ELV/nATtjFDTlsAt0eWapKg 3VlyOOb48zoDzEiKeTIZ6r12csyqAY4ia5rhxikEarduINIcIyLxm/cUrO8LA1g59PIh 2GfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=/UgFGymukxk2oabN5jLCq7hK1NltzlNY2YJLW741jZw=; fh=HpqaiOh6SSvGE+WENvI7Vb3CQG6buHGr5wVZmNcHnmg=; b=lA3foAKBFByFkXxRxjKZ2Wvq5PN/WiuS1p3raLLiXFDd6nYRpWMJSHnipI677KakC9 m8fWIX9oU0LdOuP1qJalcn/fkW5iDZQfcvwO8cRAV13nMhV3G+IXd4nDUJNyIOzChGNK J5PjwD3Q8u47fzotiLaKjTN1giDOPCsPhqWmVZk0sdnbVDuP4LlkZjgeH5mk6fJxfjgq PVv7IRXd91nJV8uT/Q0w9aIqo0zUzEurVdcNMa/BI1UMvOSasWFEOAs9TNYsKMzzw0a8 Z+CLh7uhnbnsNp6Y1XXKLGkgldOL5SGZH1G1W75OnV+XwPTu3CvkctzP9Fzau69UyRra PK6g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1768951133; x=1769555933; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/UgFGymukxk2oabN5jLCq7hK1NltzlNY2YJLW741jZw=; b=fedCAAOZpfVUeKbjW73kZ4exiCescP9L2/oIBIW/A9bINXnp9txEQ1nEry9fG+BKBv /9evRubF5lFJQao59mjRr2xlMmuSTB7Twnk74viyxVLdhBNCnNZEM8p6t5u8joCmuIJu ET5gc30rFmOwOeKIAtxgh1Lk5Nv4xfiz266DQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768951133; x=1769555933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/UgFGymukxk2oabN5jLCq7hK1NltzlNY2YJLW741jZw=; b=cen68M4EHcR9fjtypqna/AG+pKPcdpLUk3CwVtVkUZvv+EE2oXCDvww9Yd2mRvegIX ta9oSfwp5x65yGoJ3wdPkpV1zyLPZ2ndY/CTxkHQ7CulcY1YyD4R6PZ1ymtVygwN/D1V IJj9gufbo7FkGXcUnc0mWl8UFZ4+sSN1JJQIXhknQsfII4r1/w/qFTmoNZUrWG8OUv0O Uf08k8MCddz5sU/+HYr0rQA5UEV45YcOQA8Q9Uck+a40jpH6wOP2p5sl/ggY1dtTp2yH mW+z7GcT6OcrVtgBuUlnXdP6I/oCh5bFHiSiFSYUvDqPn/xDHBcL7AxlCXFgSqR1HIBy zf7w== X-Forwarded-Encrypted: i=1; AJvYcCXQCw/EM+e8K0WQZmLeyh4soo7aLtiBRYbJe9ueHJT3cAGLa4SYG+A+F7za+KwDS5p8KkQ2GEMr3VvwaoHL@lists.postgresql.org X-Gm-Message-State: AOJu0YwqwNc13pzGYLqXkGX9q6cCit5N0TRyTHZweWJDzZS06JSRqo2y 5oJcajdEsRF9uWNhQx1crJV0Jyqm2eAxNuvDBJlVmCHoMk1BghqEoKsn4JVs/Ebp2eyPcb5F9pT sLuRjd5IJFao7ZSFy0Fhkx0cTc/QjD7ZIzdviq8tdoT/841hj0yP6y/petPz/FAyv3sYOzcx5iI 3d4BxwlV6FNBrlcK/bhEzpQFYedwIVs/SqqoYGtYe0LOqU4S1m3DnqWf7rTaLAlAKmq6MG9YrVQ 2vcjGsrM8rVzfLCPmBF4dASnLasjUDqiKnBIV7QJV/VvoKSDt9EaBKW9SZZtnD5B3M= X-Gm-Gg: AZuq6aKe/VnOpYIDGb2CaG7CJx4eCxvnW3D97LUnvzv9REynj1nrrp85CYMgd4HxDlE oRoUHodjpkN22F0WojnepwQkOw+J/9/NRZRclnwbRmqFr7h7hJCXn7xZoNPCL5CXyGYh9Q64Yj3 OBeMvt5v+lOmZIZMQxoB3eozTTClEkQwbVh2IOsfW8TJ4Q6rTB1FF0ORYdzv3rLmcRTXKaMDIQj sgQwV3W25Q0HBqLluyPI107rLZBrwMUP5b/iTGsYAzbOl0zXek77DhkVgBO2aA1Dnp2yej37BPh EBZB4j/d4Mq4twI1zecrsKyDkEXq+kEacjt1VU7NPg5Gb3ClmnRQsdQW X-Received: by 2002:a05:690e:11c4:b0:645:443d:10c3 with SMTP id 956f58d0204a3-649176e3bbemr12297757d50.27.1768951133161; Tue, 20 Jan 2026 15:18:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Zsolt Parragi Date: Tue, 20 Jan 2026 23:18:41 +0000 X-Gm-Features: AZwV_QiAmYW3zqn1VviJ7I_aFaejVj0-AWsd1GlMjV0mOFmsdp48B5Z24FoCiq4 Message-ID: Subject: Re: Flush some statistics within running transactions To: Bertrand Drouvot Cc: Sami Imseih , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello @@ -264,6 +266,12 @@ typedef struct PgStat_KindInfo /* Flush behavior */ PgStat_FlushBehavior flush_behavior; + /* + * For PGSTAT_FLUSH_MIXED kinds: callback to flush only some fields. If + * NULL for a MIXED kind, treated as PGSTAT_FLUSH_AT_TXN_BOUNDARY. + */ + bool (*flush_anytime_cb) (PgStat_EntryRef *entry_ref, bool nowait); + The comment seems to use incorrect names, shouldn't be FLUSH_MIXED and FLUSH_AT_TXN_BOUNDARY without PGSTAT_?