Re: Startup process stuck on WAL replay

From: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
To: Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Startup process stuck on WAL replay
Date: 2025-11-05 09:19:50
Message-ID: CAA5-nLCpxE8Sr-FDq0bk2MO1PgTbrsy3KusP912Vw4TOncSUfw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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 = 'startup';

Regards,

Fabrice

On Tue, Nov 4, 2025 at 5:43 PM Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com> 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 helpful
>
> Thanks,
> Nikhil
>
>
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message lejeczek 2025-11-06 10:06:14 could not find a valid record after in barman's backups
Previous Message Sam Stearns 2025-11-04 17:39:26 Re: Postgres Load Profile