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 1vvezU-00CWP5-2R for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 17:17:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvezS-00EXMb-30 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 17:17:30 +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 1vve5r-00E90D-2Q for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 16:20:03 +0000 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vve5o-00000001Q5M-1eJg for pgsql-hackers@postgresql.org; Thu, 26 Feb 2026 16:20:03 +0000 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-6774d63d2e0so451383eaf.1 for ; Thu, 26 Feb 2026 08:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772122799; cv=none; d=google.com; s=arc-20240605; b=RMG4W7UYPtlKjoFPb+zASos6AjG76WAyA6HZwXwCcCDoezuxoBT5mednjB53w0xgJ5 gYz0SvtlvXLJGTeWUXg90qKjOTvqhJewCw3lNgCiuPybs0G09sm6ush0L2WbwPoWdQ/g Pom4VlO1VgmdpcK20ptyGpSQNLS5vRwkzvdHtqSuMW2k8KcxzbktG5nz6udSf2OvIxob umynocZAVtItHXlA/hfW5577QxghkSnumexk68GaC6Q6jKd5OPElXcKeQZcfLnWy1Sca 6ZRvhqEjTGsUMSxspkd//fBo+/i7nP1HePdykMNxoojdW0cBRb28Ch4fSKjTnYNfHt23 WE7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3U9/ZgjJMyX/ygeFeyUNsf4OOpTi4l5Zo6szmju/SFw=; fh=hFSd27pZZP9j+6/iWOCgUsnN/QC7v2q9PbPGLaEfbyk=; b=e6esH/HikzhMvHsWATVXRA6INFduNOQZC1OETpOVap/OGJYKZDsZ9QbT29ZlGzjeY0 ccnkL9Jvf4jOjlFk7KEa41Ea+IsPk1k0RfLmneTSiGM7YIHNdiUMBWzzSLOq+UBzbHJY akeksnAZ4lphdnefv97DtElGLaonmQ4ffJcgE/uskpzjrfm3JX1LWYj4J65jKfnafWHJ EaGi1h4Nlx3HEi3QOWHG+O1E3wt1ywgzBQB+CPqrpZPxDmUE1XpXtIA/o0m0WEExy2ll fsm35dSeDWm85qzRdu50PohoVZaWsDgmv0xCuDfpaGMm23BN9/CacRpyyFDIZTF3A1f0 xDIg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772122799; x=1772727599; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3U9/ZgjJMyX/ygeFeyUNsf4OOpTi4l5Zo6szmju/SFw=; b=RNCj+2pA4brPc4AgVJnu+jKOBTjGoZCxwDjR7UKmf7UuVFpevOG7TkqdscPhqqhFyE NZuOBf5vyLEWUelfk75w+2yhSuc66wcbkIYDSOJULlDYnTewd0GffwrSUpwruEqH18Gx Svlb1RMVJxdXG7p1X/ZcKoqVvQwNz/kSEPJbGeSoXYFGo528VjjT0gwxa0geMMbzoFyH 21B/fUxfkCAioI4m5QF0IYclOM0nr5eOI2B2jDzFB1hSLwvbBKbEMqyLztFzi9SlHIL6 xVyRM9zPelAs2GA/M9v9Pwh3L5/5FqD6ephP40sb/QCUBWfwNZ5RKYupspNqJgjVIASw Ljqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772122799; x=1772727599; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3U9/ZgjJMyX/ygeFeyUNsf4OOpTi4l5Zo6szmju/SFw=; b=Yn18JgpeC1cWDcy+NowKEzblD+JruscsAhFuSIdEJu/DpBDL5NIlnYXIWAjXpbDWHn qfOICvkUsl8xBbeI/xrsgkipXOHIhRwUhOqVf+bBrv4z2lxIjOqgtxyy27dcaanZm3Zi Vx0/iCKR9EJGaBwjOW0l2iF+DgC9pChWkhiZ0Nbj2Ga+Iwv1ABx4vBLP5bikn9CXZBtX 4lJLt9lG7Oq6EqNgPeIS8rblt2DiamyteK7nKyiNDgqEsXXxAlFvWmfqxb5clMYWB24R k0AwgqyIViiYmOS11mt7ca9A/c9S5ER98pK7m+jn/kLEDlS7Vyf2uEF/sHRNgCGiQA6u /ExQ== X-Gm-Message-State: AOJu0YxM7gDUQBY892SQDDIm/2jq3INwwbjZ8GidOBBvQD9hU8N4IohE 4SNo1khB2IOyXGno7sYyJQtlJdy+UzJmKv6S3vLq9Kn1yGeQzJ+Qa/VZP5c4PUyJFQ+PFwjbtMh Xi3Tqs0gvownbwLadTx1KyGuSlDuH9cg= X-Gm-Gg: ATEYQzx2ITJkq/m0jT3zJpqXrEjwXw2g8CKXI3o2/MwkousnMVFXOMMHP52LDJlnDvR 7uNqmvmYwEjX73+9g8b3YQPRC4Rqqx37N3xHm868kMCSg3holm7lY8scr0AbevxIWHnyrW4fpGJ UR64dy4X3gRswnrMsOH5nL8UQRqpCibafQrkMtbxOTGIhzdhc7/1whelYA84AacPbjTS94CFT87 fzX7XtnqhRBYFd9KN0Im3U8pi+o0vWtJ3b/RgTCFyljB2r1/BIV/AhHxv+Ye36Rwun9rOmImCME d+ZwjPYs1FS3vOwclF8TNGe3F5IidPLAw/QArTqY X-Received: by 2002:a05:6820:a04:b0:662:fa06:7d79 with SMTP id 006d021491bc7-679ef97d404mr2214941eaf.47.1772122799328; Thu, 26 Feb 2026 08:19:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Fujii Masao Date: Fri, 27 Feb 2026 01:19:46 +0900 X-Gm-Features: AaiRm50X-yUp5H9m8m-uFSSzCgcXztr2j6USbQf5vEjkNzMI9ck5W6xmr2bQq9E Message-ID: Subject: Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record To: Anthonin Bonnefoy Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Shutdown may be indefinitely stuck under the following circumstances: Thanks for reporting this issue and for the patch! I was able to reproduce the problem on master. On Tue, Feb 24, 2026 at 6:47=E2=80=AFPM Anthonin Bonnefoy wrote: > So, it looks like the root issue is more that the async LSN isn't > updated when a transaction without xid is rollbacked. > When going through CommitTransaction, such a transaction would still > go through XLogSetAsyncXactLSN. > > I've updated the patch with this new approach: XLogSetAsyncXactLSN is > now called in RecordTransactionAbort even when a xid wasn't assigned. > With this, the logical walsender is able to force the flush of the > last partial page using XLogBackgroundFlush. I'm a bit concerned that this approach could cause walwriter to attempt WAL writes more aggressively in some cases, adding overhead during normal processing. If the goal is only to prevent shutdown from getting stu= ck, instead, would it be sufficient for ShutdownXLOG() to call XLogSetAsyncXactLSN() just before WalSndWaitStopping()? Regards, --=20 Fujii Masao