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 1wgiea-006M3C-2E for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 12:42:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgieZ-000H8C-1R for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 12:42:27 +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 1wgieZ-000H7Z-0a for pgsql-hackers@lists.postgresql.org; Mon, 06 Jul 2026 12:42:27 +0000 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wgieW-00000001qNe-1tMM for pgsql-hackers@postgresql.org; Mon, 06 Jul 2026 12:42:25 +0000 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-92ea24a2dbfso118877085a.0 for ; Mon, 06 Jul 2026 05:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783341742; cv=none; d=google.com; s=arc-20260327; b=fvWTAh29yov+pt5n6uOwPz6at5UcOJ2AWAT3F82l5HRKymiBt9LZV8AcChJL/8KSb9 Q9FejQyeuXqqv7M/NiAjil/2Ub/Sr8o9HVOl4sZXQvUpJ/IoiKUY4lE9AZHcSxRi6w0A C79RcfMIimiuKzl3sXaQpIOB/9iLxSah9nsITfQh2ft1Y6FUIiUZxTQVUlMRUO1kp2Sb wmcAJ9smJFDT/Odpwqfzep0KU6RPhSeUmVB48srY9TJDnabsK0jivxHSAaIA7ZP4Mj7n xpRjlWx0mq+H7CTtUwEg+B9f4Ydb4yEkEA6roJJY7zKdV+vbw7qDsmUFfeSusfYtKOAD b+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=I5qsTHSJhqFw55UsBT4ZqzZbXMKsw9mpJbD2rVqlRFY=; fh=R5NAak4J1m45gLsKC+VB1iKu4u9QAPZphzvMOD3XKro=; b=oD0CTfV0Fa9K4h4A17AqLlIlmeuspPfJW6mjraIkx8oDZKh8mMG6ge/qQeMXrHXV3z GOtAiel0G4jWS0Txcz7M6OHKS/Ewx6l5XKbOGOlM7APiQIzSb8sbQYyy8PdWMBwV+kAr 09M0hFkGrUhkV7Vvqe8wRa74PoeRBWxC17EL44SsNTgs+sFNHVNB/szpm/se7OBx4boc f3TMQywF0ojSp6FEcpRVdjFgMTv7IKmXv3qmIKuwooHzQMbECY35PAG/HAjbbG7fEANa OCK4symlpRsgG433YLKgGOEPb+DEzlHa/YOUCsHVmJR1gHzxEsq2Tdydvc/jldL/0mV7 cP6w==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1783341742; x=1783946542; 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=I5qsTHSJhqFw55UsBT4ZqzZbXMKsw9mpJbD2rVqlRFY=; b=ZTBlSxGtMcLeckgQ7BDHFq0T7t+61IIOSr5MTVqHsLvIvAzT0PebUCiWRkkuFjjjp7 LcucCj3GIDas2nyNkgNdfZOOlQwMAShStla1KzWMKcwS6xc/Hf1Ix2hkBUT3BhRzAx6v AUAyY38FDBLR8H2ffXsCYFo+sInysaOPqXjmIcbGEtLCtY15ywsY0hGdbzMC8aeDVPXM n2kSmpi4tmoXPUsEv0Yzlbq3z69YHc+BGhLLFZuliAHPmZLzOi12jHHXtFLFziPdtquq PH6xXrrBGMbF4zgg/SoVFfR0Cajokc/wvQbN0QesUmyS7K7X207R1epB3YUy2wfenUDs PgCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783341742; x=1783946542; 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=I5qsTHSJhqFw55UsBT4ZqzZbXMKsw9mpJbD2rVqlRFY=; b=MZUga65l34tA1NtPuzarVS26WAXKhN2GOIEgKypVHdBCDblT11yW43m3bvq+H9qY1C +fGmNKU+bZMOtsUl0zhfmVLX+ZiehnVUAxiJAOs02Y8wAurzf+1o4/qPiDij/Yb9y9zb rfFhu1zJwgODnLU8/qlEMC4/D21bDLdIwtn8s1LMiZIk0w0h9yIBThxv/oM6+KHWAVGk FMFDfo/UCq2AhK3BG0NK4BhJZ+lZrW4FyR9uItXhxbjfo4GVYRP6qTTzvVYf9Dwpgjtp n0LJov6l3cnCPn4JjJQqOXRVyNXNJAW/inmd6SKDBo6t8mC9aCL0liYvxKjRyssQonDs 0HTg== X-Forwarded-Encrypted: i=1; AHgh+RpNeLcYjcjZ60+4GoAULXi4lnyOovP0S7ghs6M2RQYnb7dO8KsjzFYHY8fm2+1ukL6mTrvDlAWSG3xJSq+X@postgresql.org X-Gm-Message-State: AOJu0YwwdbtOQgEQXdKJ/xiw5kweRQFWQXOSksZ5jB8Ckf42hOvEzd96 BE4Ft/qolgnOiteeAEBadzl5vBKhGICohmj58Mu4Cj5lkrYrIYcy9+WUbbRfq6u6uE4neVzyw1+ oi5lmDZQ1G2FIan9pwcRhYhJsufeKPLawL1dVT3oK X-Gm-Gg: AfdE7clmZ1xVWlQSNmMEI7ZniYssI3C0U9xZy85CSVhG+nA2Kn8aVnei3UYYrv3G0y1 XRsY21MVjPCYgyYVwrIcBynzYVBnu7V8PklmDTdG37IfPmucXJNz2i1jV3k9r3kVIxLRG4CEy6l ONgSQGEoIN8c2dyx3PJAd4E4s2k8DQsCa4YB+/v2EDHbpAufQjSejnwmJ3IrRH1lOIgKAekp6q0 az8CWouUGTRw0nu53LAbYdZhPX2BT8ogWA9v26ykVvC286uxdV13zKpBaSCPCKlMPzC9qlYFu4C 2tveD92XbLet68BWrfbd75Rv+tA8Wmpygyh6Zo6M9eRAyAQiJo+WK9FM6Q== X-Received: by 2002:a05:620a:6607:b0:92e:70a4:2c5b with SMTP id af79cd13be357-92ebb5c420cmr45719385a.69.1783341742358; Mon, 06 Jul 2026 05:42:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jakub Wartak Date: Mon, 6 Jul 2026 14:42:10 +0200 X-Gm-Features: AVVi8CcmalUQd0osantrQSYBTuITLW1B-kQm8QqbRMcKY2Y1fTHD330ogWMrnwI Message-ID: Subject: Re: hang during shutdown To: Anthonin Bonnefoy Cc: Srinath Reddy Sadipiralla , Jeremy Schneider , PostgreSQL mailing lists 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 On Mon, Jul 6, 2026 at 8:30=E2=80=AFAM Anthonin Bonnefoy wrote: > > Hi, > > On Sun, Jul 5, 2026 at 11:55=E2=80=AFPM Jeremy Schneider > wrote: > > so far, it all started with this postgres hang during a shutdown. we di= dnt capture enough diagnostics to root-cause the domino before the hang, bu= t the data i do have about this postgres hang is very peculiar. i'm working= on some automation to gather more diagnostics if there is a recurrence. in= the meantime i wanted to share what i do know, in case anyone else has see= n something similar. > > > > postgres version 16.13 > > Ubuntu 22.04.5 LTS > > kernel 5.15.0-1110-azure > > > > between log messages and wal contents, it appears PostmasterStateMachin= e transitioned into PM_WAIT_BACKENDS but never progressed beyond this for a= full 30 minutes until external automation finally killed the processes. > > Did you have an active logical replication stream at the time of the > shutdown? If so, it's very likely due to a bug in the logical > walsender[..] Aren't walsenders in general problematic for shutdowns? (not just logical, = of course it might be this). The PG 19 is going to have wal_sender_shutdown_timeout, and from description it seems to match [0] to something like that. 'netstat -ntpo' would help to see from such hanged system (if walsenders running there at this point at all). -J. [0] - https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;= h=3Da8f45dee91768cf1447ffaf2527e499e75a194c3