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 1w5bye-003QO7-2y for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 04:05:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5byb-000rKb-32 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 04:05:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5byb-000rKT-1U for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 04:05:46 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w5byZ-0000000155N-2gcL for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 04:05:45 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-439cd6b0aedso270240f8f.1 for ; Wed, 25 Mar 2026 21:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774497942; x=1775102742; 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=05decUgNsBzYkXMoJetTPSNPf+Is/aro+tXtfG2+NvA=; b=nnlwJwYX14YFfYeYifqd+TVpf13mNOlHIKayjiI1SL36Ip8rSV6oRmrt7LK3tSeUOc Wumrp/rbDNTeE3IA6dKXEMN+qFIwnsO9lwyqJSHMgwU2RD7a2Hg04o1wrcXc/NbcmviX Z/88qxx+xxnnZQeXfgARzGNLjjGeodHD9IzSncMvR5yHkUYdMcXDfB1lDYtGoSz3LokK X8eIxlNa4np7Ks3fSu8lmDkkzizIh1VDZ9HtSDuQrzpfGA8mfuasrZhPErgfn6kRXycJ uNYllMUm2+yFwel8DE8ZmYf45fjlWsmMJaW/msatUwPalHnb3Tjpc7Ue9Tjrw72KYBmG oAfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774497942; x=1775102742; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05decUgNsBzYkXMoJetTPSNPf+Is/aro+tXtfG2+NvA=; b=qc1fQSFe+z/VoHQs8qNRcrgGkhBfDr9ZBUBkI5TY/zYoxtBgv0i3EDrsZwEEo0ssmx m3/zCihqakvAnh/cRBk5VVSqD9hgRkJRKfjYq3UG9m5k7YPniC8QvLUrHCaB7Pu6tjzT i6tWDlgomMtq22ybRy4HDJBUEpIVMQvzUlYtCVpmrydlz8f33az3gAkds9+E1WbT+Xg9 uZrJLV0vewnBWQNgdJfx9G4oLBZ0XBvI6jIqxLHc2mlY/6zmhDMlSZsXjJt7xBZ4fqq3 WhkRIVEwlDOrbKBHkmdp7g/L+ohqKFrPBm3Do2yzggzbgpsVT6aaY3P4KZwFD9cPRcBk 8acg== X-Forwarded-Encrypted: i=1; AJvYcCUxFqzeyY9UYKGlo34wxYa60ex+nvl6AJaA+d48MoTZOwJgEULjU/Xcvs+Abs6HRWOvdLCSksbHzFinQLgo@lists.postgresql.org X-Gm-Message-State: AOJu0Yz6TPF57VSfpUnTtLahYsoY7UOIMSBQEK3Bo6i7TbEUWVCUEP5E uIie+tq5l0WxDP3wFi5x7FSwRBJgAwT9+XGafvHB/M8/iLZH/LJFknyg X-Gm-Gg: ATEYQzylo6EFEqQbqvaoYMSmiLl/MUMz7XQ1PdWh+MrocQPZbNFUzdn3u4VbC4JxkPK f1vZ2fm/jV6qg/X9aKhg5MLz78JnFem8+GrP4F05jjh0PnvdyiBv4z2hTBoak4nk8UM/HpXwrPd 1mMdqq1Om9mKUFNS3CaAEFiV09kdCAuJI2MXoJbc8sk3KU/G31JdBzHG4Fp5WE8THA/5dvFHTZ3 ibopOFPnEVqPDZgrLoHIxwXWGZmsLXiNYRVyCE607UZeBJAV8maVfieOsQlZHgApRq50ZnMG1RA j7G7gGGKB55sQOr4bl5FwPiDDOZf1o2BlgmT+vJruiYJdV/qbsypVyfWaDjxeMJBikPIDGbjmGO 7mmo+L2h0e++H4WoZ5esA7Pqqj+Rb2ewkgqG0eCXjz+5TDg6Cgur7kuFx7HU0RLqZOK3CzIO2FV +or2VQbn/sX4cInb6nM7H2CQS4aOt9JEXVp4GKlMO8OOVxG3ocMj77ZyHBo5T/YRfOlvTp0aYvP lFLZ7KOMDOy6JBCCPIqYRMOtb+Rs1lEsDQOkRB0jCzAz3puI1K9UKKkAQ== X-Received: by 2002:a05:6000:2512:b0:43b:647d:2c7c with SMTP id ffacd0b85a97d-43b88a254e8mr8108835f8f.52.1774497941974; Wed, 25 Mar 2026 21:05:41 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919e68a6sm5658129f8f.33.2026.03.25.21.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 21:05:41 -0700 (PDT) Date: Thu, 26 Mar 2026 04:05:40 +0000 From: Bertrand Drouvot To: Michael Paquier Cc: Andres Freund , Jeff Davis , Greg Sabino Mullane , pgsql-hackers@lists.postgresql.org Subject: Re: Adding locks statistics Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xXiKR5PTcrB7/XYd" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xXiKR5PTcrB7/XYd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Thu, Mar 26, 2026 at 08:06:20AM +0900, Michael Paquier wrote: > > I like the patch, but I happen to not like my initial idea of relying > on a NOTICE in an injection point combined with your new API in > BackgroundPsql because we can already achieve the same with a wait > injection point and use BackgroundPsql::query_until() with an \echo to > detect that the command is blocked. Yeah that works too. > The updated version attached uses this method (edited quickly your > commit message). Like your patch there is no need for hardcoded > sleeps and the CI's first impressions are actually good, Same here. > but I am > going to need more runs to gain more confidence. Note I should be > able to do something here in 10 days or so. If you could confirm the > stability on your side for the time being with more runs, that would > help, of course. With wait + echo we don't need s2 to "on_error_stop => 0" anymore. I changed that in the attached. I'll run more CI tests during those 10 days. Let's sync up when you'll be about to push it. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --xXiKR5PTcrB7/XYd Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v3-0001-Add-tests-for-lock-stats-take-two.patch"