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.94.2) (envelope-from ) id 1tO9lh-004TcX-BS for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2024 06:12:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tO9lg-007sFd-EH for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2024 06:12:16 +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.94.2) (envelope-from ) id 1tO9lg-007sFP-2d for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2024 06:12:15 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tO9lY-000XJv-AJ for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2024 06:12:15 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e2880606so290017f8f.3 for ; Wed, 18 Dec 2024 22:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734588726; x=1735193526; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kvG5NMb974J6DGwGc7pFreHCSBMqJvgTdXpgaT4bYq4=; b=dInOSODkJlJXMArz0EGb5pI4tLRH16frQmvTWF8siHgShSPFcPpfGkHBxNWVURSNN4 YIxXufjCWlHG0+FaE/WdPsvfKH7arVjYaJas9VF7rsscd/8wTkz1SDdjblvCOSscERoZ tJ1J+pgQsPT8kF2M80qApmttEzLw2jnAMEiURmaQFQN71AmL5hr4//eWpEJfwtaxAdie byLPCPjdbdMi76jndGEBpC8aGWlg3U0W8oH3fmHy8t0Y0LHjt15+29hwsVDTzML8ZNAA FVkuiqqlQGeQFJuZQxYxDr4p8nTdBlyS138ilL1wcWhafi1o8a8MyDa9vJSezoGtpcFL NTFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734588726; x=1735193526; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kvG5NMb974J6DGwGc7pFreHCSBMqJvgTdXpgaT4bYq4=; b=L92kHA16Qi3N6YkOIGBtn6Z5IHzVxXf2CJgTDqH/CaW/hE3EguPjSiFjoIVCWcwkwg UPhJru9+IMTHfLvpImU47dojXqv2+daXzdQ3I+MN8cdGiFum1DjEWd+74trxpPfHzB4D dCYve2evubUq/t0piKpWVI1ehxPQm7jEuaCTRMcbGvep3DBgrf8X2EdiZqtzYVt6dsYC 8Oy41aDmMVAc++jsYoxYu30pLFWgdXTAvqms8kbXR48gka730IgRqYY5W8tT5MaxsPyx iwOOG+euUMfyML2OZ7wuZ8qkqIiEYbN+1MT5JHnJo1KK/8D/7wruygmUExPkGAZXpbtR 4+dw== X-Forwarded-Encrypted: i=1; AJvYcCXW3/jkhbjXjd9UNFG/Da63hyMOfqz7ipwzIIVyb3Bfo5OWC+CYjwufq7gKqbXDv9RrGlxj203YXuF/axyk@lists.postgresql.org X-Gm-Message-State: AOJu0YxniKbm5NhHPr1GJilu6+hABD/pOUkQlLv+VVDn5yfdj651Zl0T 1ILBjNI35SxrRfwmlr7aSSIIKSJHEsXiUF2rGjzewWaNcDMKS40y X-Gm-Gg: ASbGnctA6T1wXKUyE9t+X0RVa/RHIVRABAlH38f2r95v31BL+aamGZEp0UBqW9vGtsB qMKAcR6ktD6Yfj3HRdp6S1sq4bQmOw1Zkg239olnXkE/IM1J8R70uQQDyS3jWfTzEB1OEiHvNTr C0937kKiDNXQTqOIjPxE6LviJVjyxfZahkPzPcZaSDDBvVeVrPsK/rJKXHwy/kXfEGZ5408dypD K0S8E386ycULcUQYfbD/ST6y3bxppJsxviN8Zf4rb9eHEjzWg2iizxAKC2gIqk2iaw5dfU5J6BW vSnvaBuRuxPOqPBWjEUi7K+gJChQNVDDhV1cvrEYdCIbYT4zppPvtwmeDb1OpYGU542pzLuHk0O g0v2v0PY= X-Google-Smtp-Source: AGHT+IHxp0mkPKunGbBWyFmCoTQZasACpPekx9zNtR5+HAfIui12mQ8u85tYcfFerfGSfUc+gl0IkA== X-Received: by 2002:a05:6000:1545:b0:385:f560:7916 with SMTP id ffacd0b85a97d-38a19b13a0bmr1725346f8f.35.1734588726119; Wed, 18 Dec 2024 22:12:06 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8292adsm706546f8f.19.2024.12.18.22.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 22:12:05 -0800 (PST) Date: Thu, 19 Dec 2024 06:12:04 +0000 From: Bertrand Drouvot To: Michael Paquier Cc: Nazir Bilal Yavuz , Alvaro Herrera , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: per backend I/O statistics Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Dec 19, 2024 at 01:21:54PM +0900, Michael Paquier wrote: > > While doing more tests with backends exiting concurrently with their > stats scanned, I have detected one path in pg_stat_get_backend_io() > after calling pgstat_get_beentry_by_proc_number() where we should also > check that it does not return NULL, or we would crash on a pointer > dereference when reading the backend type. > > Fixed that, Oh right, indeed all the others pgstat_get_beentry_by_proc_number() callers are checking for a NULL returned value. > bumped the two version counters, and done. Thanks! I think I'll start a dedicated thread to discuss the stats_fetch_consistency/'snapshot' point (will be easier to follow than resuming the discussion in this thread). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com