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 1v98mE-00AZS4-LH for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Oct 2025 21:11: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 1v98mB-008IuG-Od for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Oct 2025 21:11:14 +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 1v98mB-008Iu8-FR for pgsql-hackers@lists.postgresql.org; Wed, 15 Oct 2025 21:11:14 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v98m6-002Obk-0x for pgsql-hackers@postgresql.org; Wed, 15 Oct 2025 21:11:14 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6BA0A14001DA; Wed, 15 Oct 2025 17:11:08 -0400 (EDT) Received: from phl-imap-03 ([10.202.2.93]) by phl-compute-04.internal (MEProxy); Wed, 15 Oct 2025 17:11:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compiler.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1760562668; x=1760649068; bh=xRph7x9kApGkhVmCnOYTGsugfmxKwkDD8occ5f1lhS8=; b= OYGVRXYHgP6wyqcYfUEjKAp749Dd1qcfcIop49CUEg+7Bw3jwKtAh+sQaHNAyzxL uvjXux9pwGu1C8RWhmTFWVOH1lBenBE+Azss4Dm1wWcw5lAj73b3rRdg85howoTH ECBcFcJESmMPE2/f8c6woF+XvEXUs4FjUuFCqW3y407YEn67J7hWTadMHoanFf5r J9YdeAF8IWILXJtOgDfkpYF+c3pRAoVKPnfDQiaMx9V4LFz9Z44VyVCDbGanw0LB sKLCwE0pUMUG8bQo1w0Yrn/z2lMix8Rop08w446AFDBws0I02NOtsW9/G1854Eua dwEAb+olMwWiJcyOt+9CWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1760562668; x= 1760649068; bh=xRph7x9kApGkhVmCnOYTGsugfmxKwkDD8occ5f1lhS8=; b=u DpjCXqPJXLdBD3HRj3av/43CbkoX9hYoFyd1+ySJvTDLOHkiynInkiGzhlFKxGI5 +3ce82XXOdF69D+9uP1MxLa8rishKw07RKSOpNBYCsqnGCVFoXgrePwI2Jq77lOW kByX1W9OT1oxun1AFtnixqcYItAgTgbOizOng7T+iqZ2Ybprx0XWfRrJMPKnv+i6 c9leflNljdTHnpBJQ3urvWSjIcKfzPMiNV8S4jiyiLhad6vCmt1MLMLCAmW9AgsL olmZrPY2l4fCHQ5upYf4tOM2356giy1lQdfuImc8VEteVMeHxF2lnkcoZ3ocOicI BcaqHe1uZ0oI0h2jeC94w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduvdeggeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefoggffhffvvefkjghfufgtgfesthejre dtredttdenucfhrhhomhepfdflohgvlhculfgrtghosghsohhnfdcuoehjohgvlhestgho mhhpihhlvghrrdhorhhgqeenucggtffrrghtthgvrhhnpeefheelffegvdelfeevteejtd ekteefleeihfdtudelkeeijedtvefgueevieekieenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehjohgvlhestghomhhpihhlvghrrdhorhhgpd hnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrrhhs vghnihihrdhmuhhkhhhinhdruggvvhesghhmrghilhdrtghomhdprhgtphhtthhopehpgh hsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopeht ghhlsehsshhsrdhpghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: ic6394509:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id DD10618E0054; Wed, 15 Oct 2025 17:11:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: AZ7XRsRLdGms Date: Wed, 15 Oct 2025 23:10:47 +0200 From: "Joel Jacobson" To: "Tom Lane" , "Arseniy Mukhin" Cc: pgsql-hackers Message-Id: In-Reply-To: <1126737.1760537761@sss.pgh.pa.us> References: <6899c044-4a82-49be-8117-e6f669765f7e@app.fastmail.com> <165530.1752362320@sss.pgh.pa.us> <02a7cd37-e2fc-4212-8b19-f8c239c95fb8@app.fastmail.com> <96f00bf1-cc9d-4520-9d02-9e14e7767c88@app.fastmail.com> <30c2aa7d-dd6c-4b68-a2e4-f217a1a34acf@app.fastmail.com> <0b4d402a-9ac2-4aa8-acf8-8231dbe579ea@app.fastmail.com> <3095599.1758644879@sss.pgh.pa.us> <0dc6a2cc-5216-4dc1-9dd2-430cafc6095b@app.fastmail.com> <52CC167F-763B-4ECA-B0B4-DAB381816828@gmail.com> <9186C6D0-F7A9-482A-9183-89E530B57E36@gmail.com> <1073593.1759423179@sss.pgh.pa.us> <4bd5e6c4-6fa7-44bb-869d-59a32a331fa8@app.fastmail.com> <85828f29-e72e-4400-94f3-9a69bc8dc239@app.fastmail.com> <2495353.1759860890@sss.pgh.pa.us> <8aeae418-92a6-4bbd-9c06-9574c79e59f7@app.fastmail.com> <2531672.1759868124@sss.pgh.pa.us> <474efa78-337c-41cd-a73a-f845a0115109@app.fastmail.com> <2749343.1759949176@sss.pgh.pa.us> <8bfca2be-1ec0-4e15-aafb-0b7b661fe936@app.fastmail.com> <9eba307f-f2fb-48f0-9507-2e197f39ef9e@app.fastmail.com> <8c71183a-0d28-4bcf-a806-78446ff95404@app.fastmail.com> <1009807.1760476747@sss.pgh.pa.us> <2a30bcf1-aee2-4b07-a302-11e4b350adaf@app.fastmail.com> <1126737.1760537761@sss.pgh.pa.us> Subject: Re: Optimize LISTEN/NOTIFY Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Oct 15, 2025, at 16:16, Tom Lane wrote: > I think we can perhaps salvage the idea if we invent a separate > "advisory" queue position field, which tells its backend "hey, > you could skip as far as here if you want", but is not used for > purposes of SLRU truncation. I want to experiment with this idea too. I assume the separate "advisory" queue position field would actually need to be two struct fields, since a queue position consists of a page and an offset, right? typedef struct QueuePosition { int64 page; /* SLRU page number */ int offset; /* byte offset within page */ + int64 advisoryPage; /* suggested skip-ahead page */ + int advisoryOffset; /* suggested skip-ahead offset */ } QueuePosition; Or would we want rather want a single "advisory" field that would also be of type QueuePosition? /Joel