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 1waCTa-001bM4-0p for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2026 13:08:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waCTZ-00BLEZ-0K for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2026 13:08:09 +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.96) (envelope-from ) id 1waCTY-00BLE4-2T for pgsql-general@lists.postgresql.org; Thu, 18 Jun 2026 13:08:08 +0000 Received: from mail-wm1-f54.google.com ([209.85.128.54]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1waCTW-00000000ySI-3cfc for pgsql-general@postgresql.org; Thu, 18 Jun 2026 13:08:07 +0000 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-490b613a17bso6916545e9.3 for ; Thu, 18 Jun 2026 06:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781788085; cv=none; d=google.com; s=arc-20240605; b=hnBSa941cTG5jS/lfUoheWOljn0oafhj1ZkJaiQz9xE+7E0jJfkAluVoMMUdlCXE/U z1YF/Rf/lkTGBdK41AO+dZpEnOZi+PavWnIFYe/gwukWgfo3mopIa4xlLhs3xZjK905U XbNlaIfORgKbeZ100082ZrK6IbymwKDdhEwLsFszgCLu7Wu9y9bL8fmYSAfNXuNzdb94 l5NOk3VDx/1DelzZ3pJMQ/FkJcxKbUlMRECaEyGS0QJkvZrLWfGJXIHD2JHnUH63HhuT h1nPbJY//+Vvr63FNDhqFHbMHXkG/hOtx8HIAzZ+y4ZRBdvRsM24JJLuYsx+uokTPIsT Li5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=KGyRn447WSwr3WTGGZckENez7g2Ybtmrk2CDj53CasI=; fh=o6LZFw6NrUKkbdNgSxmP0lishc4Y7UQn9lkbcuLjY0M=; b=SllK7ZIR6+ohFun3Io9EXaaydrD1O4lTkSL++lVeZKH1rb88TUDwrqUns/9fd16L3I eiOkSmEO6Q9st9LWAnjd/Q3im+YDOzgaOox4/Jys3yRjSu/DRa9Uz4+8kqInWUg0GO4h mk5q+LzAEOPjAy/aLH7svJ0qlXwN08OVDo9ExbvU8hkyRuvZSwlrvoBL0S83bE100bLH 2sYTCGBbQdZiYIYe78DUYa7Xf1jx8wBUb0atRkB5Dx5s02Lz9MMgGDIja6HhjdKFPLxp ihyIUGkGQGil4Rlh9bbY5Oj3yX9JLXTyrxlkoicoMnrQh+UoLtHgTo7k2QQ4uuWx/Zm4 gufA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781788085; x=1782392885; h=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=KGyRn447WSwr3WTGGZckENez7g2Ybtmrk2CDj53CasI=; b=dLOMkVXfFuYBMzm/VR0t4fO97yKM1DoXtEnoIDk2++65pHeYLlq4HV1qvuWZ6gLomM eYvk8WSdhGvRDo4knqqxoCGfCvhrjxKPRYZuSrvyBwDnPfkxWSnaUs/Yi8jrFLG1ZQjv +fpSg7cNpCW0470agBvpyhUTYYLSwmbLOE2YcW7qJr4pf/Wwgp0YpLfhbXDEeEbTZpqk yvqpErXQdeIS85mp2aQJnqveU+JDkFfklaCD00uf/YRGHgMtBTNzu3cG5gjS0IulaVki sVrINsly4cjfIQWvebbn/prD7VXdWWlQQeJDC1CNv8ZOeU+0msAXVCgOWHxDY2UG1vjH n/iw== X-Gm-Message-State: AOJu0YzZi3a2xvZV6A5E93FRacwBRTGkkSX6scyz1g0Gtlv96xpPPP9L uQTV4l7UJ36wilB3buQHtpQL003PA8lp7lxo/fhTKfVFomKLTgexAZRjxp3GVROkiE5c8o5imRE FlnFoWxSFuyEeQlEBO4Ot+tp+hV7ZmvWWmqNH7d0ueD3d X-Gm-Gg: AfdE7ckmkbpsMDvV3XsSc/cLv3GwgeYxpa6d/eRZxQ/c7cjy6SlCk1yVTMkj2X+gsdy LYlEfp+yHICceS1/t1iIdIfERJ6DWz6xzevdCVK6kinZn7SfDb3l9Q5WGXa72OkUDSnh8IJ8KRT +9qtNj59Yd3vaT4/f3ILo0ElHCc7OamEHbkhrwQqHIemArhOFGjFTrzYlh0miGh1LVozob6VmG6 LJttoHKyihmQioaPzsta7xDSTf7pjRhLPbly4rfqvh9BqqlvlezeyRTNLxp2Xc4j/ghj+BK X-Received: by 2002:a05:600c:524d:b0:48e:5d91:cfe3 with SMTP id 5b1f17b1804b1-4923a950abcmr34569635e9.1.1781788084547; Thu, 18 Jun 2026 06:08:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Thom Brown Date: Thu, 18 Jun 2026 14:07:36 +0100 X-Gm-Features: AVVi8Cci19W0hyqYSYMiNxmecV5TPKXVrvNgWwsItE6tCZX6BZb_Qxc9eyVHy7s Message-ID: Subject: Re: Why is WAL-file based replica stuck for long time (hour?) in IPC:RecoveryConflictSnapshot ? To: depesz@depesz.com Cc: pgsql-general mailing list Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 18 Jun 2026 at 12:57, hubert depesz lubaczewski wrote: > > Hi, > we have set of clusters that run on pg14 (yes, I know, we are in process > of upgrading but it's complicated). > > Recently we noticed that some of the DR nodes are lagging because they > get stuck on some wal files, and starup process, in pg_stat_activity > shows "IPC:RecoveryConflictSnapshot" as wait event. > > The thing is that there are no othger connections doing anything to the > db. There are some idle monitor ones, running things like count(*) from > pg_stat_activity, every now and then, but we're talking about pg being > stuck on single wal up to an hour or so. > > Stuck as in: > ps shows: > postgres: 14/main: startup recovering 00000003000065EA000000C6 waiting > > What could it be, how to fix it? Have you got anything in the logs that say "conflict with recovery"? Also, I know you are just running count(*), but is there a transaction being left open? SELECT pid, state, xact_start, query FROM pg_stat_activity ORDER BY xact_start NULLS LAST; Any 'idle in transaction' for too long? What is max_standby_streaming_delay and hot_standby_feedback set to? Thom