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 1tq8gh-0002U4-Tb for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 10:42:47 +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 1tq8gg-006lFb-In for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 10:42:46 +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 1tq8gg-006lFT-92 for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 10:42:46 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tq8gc-001HR5-2G for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 10:42:45 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4394345e4d5so2600495e9.0 for ; Thu, 06 Mar 2025 02:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741257763; x=1741862563; 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=CJzx0LLI3by44CDg6dTreHdNVoo0ajApaMq+5fylSbg=; b=fQ0ucbK8HNEH8zM6Stzsp9mVOLw24YNfSplP+33eGu8tUAo81SqQD1qZh7FWEGPKFJ Yh29YgOTihFWCh35iA3GKz0fGRtPFTGhiwV7Aquoywvmep2QRIN+HlVVKWAXEtWFhbtg w153gUyecipLqPMiG6ldkohMgn3TiDAwIBw8JXUpRlxElDv4SHmdm8b+jpTry+XBzcRj 7Jr2XKgg/QuMVMcx0rADRI58QvjE57Xj+S2o2pejiTMIcqp2+emq0DKd1UPRWxo26roH oJbHQ6HC9WGOWGYUU3lilnNIatOkhgxxWxUMX0UAp/7tgLS7AYmeOz9WbTPOVACh/RCw 1hyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741257763; x=1741862563; 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=CJzx0LLI3by44CDg6dTreHdNVoo0ajApaMq+5fylSbg=; b=DrEqBQXvMSjNoflN9FX7gQRVo/RH32nYnPSwk44Yye//SJLQdd4tn+Ftc0lXvxwkQG 7ONBAX4gUAhl5LgkZCawcrBuhlcrCPKW1mLP5iU/ppADJjO4BxaSSnW/F1amG112Lkd5 ykK9gyaBxP+iCLYiq88PcREvFx/5splYhGeebznKwRUSuvRG6iCfCBtn801V0sTskCwN RDqF08AIb0+BPIsjruDzf9CDE+22AmhfTYNFFndY3sIUcRYWqly3eYdQXR7VJ7qNCEYL hD0lUAV7ohHrKEQBcNgdvOrOm1IkXvsR7EQXvGcoXVG3sy02RDkH1ZKoqeMrY8nF52nC 1A8Q== X-Gm-Message-State: AOJu0YwvEEhJ/cVEw70VszWfrdJ5M0f1kwe+ur51C9ai+MOz60HQj4IL 2L/pv/dmGI+H5V9qhSwXdK7vf+EtHDodJaKOkNZgcMh/RtUcMo1qcpWMpA== X-Gm-Gg: ASbGncuHOpGANxYsrzhs1WE1y84U+KAUJe2W6v8SClDMPLvcLKjmLi8sjrI3R/O6uJI 3tRLyTCWOlhLR5biokWr18njYn0615tgpYnFA4a0iFrkAJnsszYftosnc9qb1Wq8nhjXHUlyxfJ j7dvdH6vz1oTRjSEpJEsrvdxdeiGyu6SMYHLsysKbZ2lY76pkbXiYIgfCvSMLkgpRuBTAd/vZAK UJqyQNwuBkrQkNpj/zCSBbtwIjThv3uDAiTpkcgTzno4Z2lXeIN7o8V/sanDQuSdJcIFQ5j9OVn 8JrFyp4pXnWRmkI7XFeFdGOW0XxJC6j++2EBu9XqBURZygTlxZRJCXv3xDi5KGQVOOJ9FOmVYnj t4+JS628uWb349ZTjvLPMQIsJYpOMirjcMD1GsmLJCSVMR8OoCKt7dPb5rTaa+zlAyjIuMdtM/M qu X-Google-Smtp-Source: AGHT+IGxNdo9ghXJoBoTxV+fNL2DRsqrj/upCWyXnJEgPpyee1omNiIZttm2E2PIRuqNUImL+QErZQ== X-Received: by 2002:a05:600c:4f87:b0:43b:c3af:3304 with SMTP id 5b1f17b1804b1-43bd29c93e3mr46684085e9.28.1741257762484; Thu, 06 Mar 2025 02:42:42 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-181-182.eu-west-3.compute.amazonaws.com. [15.237.181.182]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd426c33asm47569025e9.3.2025.03.06.02.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Mar 2025 02:42:42 -0800 (PST) Date: Thu, 6 Mar 2025 10:42:40 +0000 From: Bertrand Drouvot To: Michael Paquier Cc: Postgres hackers Subject: Re: Monitoring gaps in XLogWalRcvWrite() for the WAL receiver 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, Mar 06, 2025 at 10:12:37AM +0900, Michael Paquier wrote: > On Wed, Mar 05, 2025 at 08:04:44AM +0000, Bertrand Drouvot wrote: > > On Wed, Mar 05, 2025 at 12:35:26PM +0900, Michael Paquier wrote: > >> Perhaps there's a point in backpatching a portion of what's in the > >> attached patch (the wait event?), but I am not planning to bother much > >> with the stable branches based on the lack of complaints. > > > > We're not emitting some statistics, so I think that it's hard for users to > > complain about something they don't/can't see. > > Hmm, not exactly actually. I've missed that ff99918c625a mentions > that WAL receiver was discarded on purpose, but this was still when > pgstats was not in shared memory and still file-based. We scale much > better now. It is not that difficult to make XLogWrite() hot enough > that it would trigger a lot of calls of pgstat_count_io_op_time() per > ms, either, like the WAL receiver, so as long as the timings are > behind track_wal_io_timing we're fine. > > Let's do this at the end, without a backpatch. At least we'll be anle > to get better IO metrics for replication setups. Good catch about the comment in ff99918c625a, so yeah I think it makes sense to not backpatch then. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com