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 1vGZgV-0019w1-7k for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2025 09:20:06 +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 1vGZgU-001S77-3W for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2025 09:20:05 +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.94.2) (envelope-from ) id 1vGZgT-001S6z-Np for pgsql-admin@lists.postgresql.org; Wed, 05 Nov 2025 09:20:04 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vGZgR-005Ybd-0R for pgsql-admin@lists.postgresql.org; Wed, 05 Nov 2025 09:20:03 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-656b7e9049bso23097eaf.0 for ; Wed, 05 Nov 2025 01:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762334401; x=1762939201; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6X5/6a3qY7O3JehwffrQgyWU4JfLfsT7yWIdGmTx9xU=; b=T4lj3dwKFLpiSQdjcBqXgVmM6Bu/ZU4+ZvGBT7xK9sjYhYqzI5a314IZGjnn8sHla0 bD3iEq9xhx1WgkqmoYNQkbjLd87Ym+71GSIIk5n7Vvge5DLhwlDLDtHzw8l+odn/6u4M XhJ5i7+bfD0+cVnuCoT3ECpWxe5mjNRsFZMDhekqvM8st5Mf1xsHtziV5uOLiu88eTBf DDo/D9loBWpKekzvNYwWI3GpfZFqogg6N4oe7fe99sgY6Rx8Z3CUbKpgP2hVw4l1fCuL y6mi7Thpg9+eNUo+gTc/5aQ9MnvG77YJ/gU8miqliqYiadN9g9SHI3AXw6CHdi6d7nJR m3zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762334401; x=1762939201; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6X5/6a3qY7O3JehwffrQgyWU4JfLfsT7yWIdGmTx9xU=; b=nS8Yej3bPVyjJ2Cm//xbZEYKVOJj3NlJ/+MT5OBimyXbE2A7QGvNdyzD33pMNhTwgo 8Wi0S1q3NJeXSe82ME1f9zrwYv0nZxBocVCQmv+G4/1ORf/GwIShVl96Yknh8mSmkgi2 hosSoASmsUD81Bm0CKukJUhRXENqIFpxnXC0HFP70KIRNKwY2RlmqhgkdxxqPPqVD1BF z6tNXTfhhUphqDAKvlF0IVMP7rQkwbIopScsFCJD/EvvxE9qA/DJzuJGCGHk+bMnsQf8 NRFwwl2NMsKlAYH0SB0+uhev5/6784MvTTYI/8fhHwkilt4LVcKVyj8QM7rQdlMIrQQH nfWw== X-Gm-Message-State: AOJu0Yw7l0RUplUQ+N5B8w4hDNpyCVbHEiQmeJA1J+9seJuqBKxV+cr9 xVElB5qvD4mzakcvSNF4EMy8hD0ntd3WbDyARm3hHbHtSUGoDnRZb1Lvzr8QDwb3B6DcnUFABz8 VvlyXHfVO5XZCk9juOnfmX9MsE2hEPCA= X-Gm-Gg: ASbGncuBUzvzHubo23F4O1AIIoytIHoGe+d/D4bk7sM4IEnwWSWZ8dgj9DUdRFD+NAI YhHboSqxmd2tRzGrXqeJfka0zUn5lhZRIoynXzmxZ9UDqUBzRq4PN3a2h4MLMXjOpaNDBLHChpA J/3yql1+Lzv14F3wihSlPD9BYTi6MzqpPoGhk2AHoOm+fZeYZQzEAqVGZm26z8KFmDv7eSRcEkU PLTxZtKlaqazKbbk95Wkc6/yckbL1f/0wjbbrOYezVgq6o1rZd7Pdah/sM= X-Google-Smtp-Source: AGHT+IFTIrhObbyfTmdn1z/T05MPqF8Tggvqa3rE0CA2eZ9Hlfabg6ndF+ukuAGGW1257YG1lF2h2GOs4B+Bx6osQkk= X-Received: by 2002:a05:6820:630a:b0:656:b769:34d with SMTP id 006d021491bc7-656bb62909bmr366147eaf.3.1762334401611; Wed, 05 Nov 2025 01:20:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Fabrice Chapuis Date: Wed, 5 Nov 2025 10:19:50 +0100 X-Gm-Features: AWmQ_blKBAwnzEKh4BXJRui7rW_bcJzLfuEa3PYPRu2wHxS3V9wxIUi14n24o9I Message-ID: Subject: Re: Startup process stuck on WAL replay To: Nikhil Shetty Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000fbcdf30642d57360" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fbcdf30642d57360 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Nikhil, Did you try to use this query to see if kind of wait event exists? SELECT pid, usename, wait_event_type, wait_event, query FROM pg_stat_activity WHERE backend_type =3D 'startup'; Regards, Fabrice On Tue, Nov 4, 2025 at 5:43=E2=80=AFPM Nikhil Shetty wrote: > Hi All, > > The startup process on a replica is stuck on a WAL for a long time > LSN - F46/FB4FCF88 > > We verified this from pg_stat_replication output > > We did a WAL dump to see the xact for this LSN and it shows as below > > rmgr: Heap2 len (rec/tot): 56/ 56, tx: 0, lsn: > F46/FB4FCF88, prev F46/FB4FCF40, desc: PRUNE latestRemovedXid 884637333 > nredirected 0 ndead 1, blkref #0: rel 1663/16402/72663 blk 0 > Would such a xact cause WAL replay to get stuck ? Or is it some other > issue? Is there any way to check where it is stuck , strace was not helpf= ul > > Thanks, > Nikhil > > > > > --000000000000fbcdf30642d57360 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Nikhil,

Did you try= to use this query to see if kind of wait event exists?

SELECT pid, usename, wait_event_type, wait_event, query
FROM pg_stat_activity
WHERE backend_type =3D 'startup';=

Regards,

Fabrice

On Tue, Nov 4, 2025 at 5:43=E2=80=AFPM Nikh= il Shetty <nikhil.dba04@gmail.= com> wrote:
Hi All,

The startup pr= ocess on a replica is stuck on a WAL for a long time=C2=A0
LSN - F46/FB4FCF88

We verified=C2=A0this from pg_stat_replication output

We did a WAL dump to see the xact for this = LSN and it shows as below

rmgr: Heap2 =C2=A0 =C2=A0 =C2=A0 len (rec/tot): =C2=A0 =C2=A0 56/=C2=A0 = =C2=A0 56, tx:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0, lsn: F46/FB4FCF88, prev= F46/FB4FCF40, desc: PRUNE latestRemovedXid 884637333 nredirected 0 ndead 1= , blkref #0: rel 1663/16402/72663 blk 0

Would such a xact cause WAL replay to get stuck ? Or is it some other= issue? Is there any way to check where it is stuck , strace was not helpfu= l=C2=A0

Thanks,
Nikhil=C2=A0




--000000000000fbcdf30642d57360--