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 1wRwXh-002pMH-1d for pgsql-bugs@arkaria.postgresql.org; Tue, 26 May 2026 18:30:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRwXd-005bQQ-3C for pgsql-bugs@arkaria.postgresql.org; Tue, 26 May 2026 18:30: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.96) (envelope-from ) id 1wRwXd-005bQI-1x for pgsql-bugs@lists.postgresql.org; Tue, 26 May 2026 18:30:14 +0000 Received: from forwardcorp1a.mail.yandex.net ([178.154.239.72]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRwXb-00000001Z3H-3Fhr for pgsql-bugs@lists.postgresql.org; Tue, 26 May 2026 18:30:14 +0000 Received: from mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net [IPv6:2a02:6b8:c2d:3530:0:640:eca4:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 2C966C0162; Tue, 26 May 2026 21:30:10 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:d5f::1:12]) by mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (smtpcorp) with ESMTPSA id 8UdF260XXuQ0-fL7z5Hq5; Tue, 26 May 2026 21:30:09 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1779820209; bh=PSB72wkRpbx91B8u1A/cV0ZO85OmLvCXPi8boxNlOsQ=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=oKETP56oRjHgsEUvjrI20lDFcpNRN8uhsKFmIHMnD26CWJRahkd9A7/DMJpXEMIFb 1pPIrnLYFVC6bweKAEDwI2oqVuLOB13bt2VjMh4HGvxHIB2u5ua3fh1iqZ9RQLmu1o kEiF71VCjPUH2ifTKogbwSYk7lmpaN3vh+rBYKmU= Authentication-Results: mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: BUG #19490: Streaming standby on 16.14 stops applying WAL on MultiXactOffsetSLRU when primary is 16.8 From: Andrey Borodin In-Reply-To: Date: Tue, 26 May 2026 23:29:58 +0500 Cc: Michael Paquier , Ayush Tiwari , Radim Marek , Marko Tiikkaja , PostgreSQL mailing lists Content-Transfer-Encoding: quoted-printable Message-Id: <90F2A05B-FEEB-4695-87ED-32F53C6AC097@yandex-team.ru> References: <19490-9c59c6a583513b99@postgresql.org> <46FE61C9-F273-45FD-BED7-0F8CDA6EB992@yandex-team.ru> <46DB3CAB-EA1C-41A5-9D6D-5F913A2AAF66@yandex-team.ru> <9DF05C0C-D165-4821-80C2-FFAF47C07FF4@yandex-team.ru> To: Heikki Linnakangas X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 26 May 2026, at 17:28, Heikki Linnakangas wrote: >=20 > looks correct I tested that change as follows. Setted up REL_16_0 as primary, REL_16_STABLE as standby. Generate multixacts in a single session using savepoints: BEGIN; SELECT * FROM t WHERE i =3D 1 FOR NO KEY UPDATE; -- repeat 2500 times: SAVEPOINT a; SELECT * FROM t WHERE i =3D 1 FOR UPDATE; ROLLBACK TO a; COMMIT; Each iteration creates a new MultiXactId. 2500 iterations cross the SLRU = page boundary at multixact 2048 with some spare multis (we'll pickle the = excess ones in jars when all is fixed, toying with 2048 wasted dev cycles for no = reason). Test: 0. Run the workload on REL_16_0 primary (2500 multixacts, crossing page = 0->1) 1. Take pg_basebackup 2. Run the workload again (2500 more, crossing page 1->2) 3. Start the standby I observe: Without the change startup deadlocks. With the change standby catches up, the DEBUG1 message "next offsets = page is not initialized, initializing it now" confirms the compat block fires = correctly. I packaged this test into a buildfarm module (TestReplayXversion) [0] = that builds REL_x_0 and runs this check on REL_x_STABLE build. It reproduces = the deadlock on 14, 15, and 16; 17 and 18 pass. Currently I'm struggling to inject = regress WAL trace into it, not working so far. On a bright side - I managed to get PR = number 42 in buildfarm client repo. Best regards, Andrey Borodin. [0] https://github.com/PGBuildFarm/client-code/pull/42