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 1wi5Ev-0000Qs-2l for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2026 07:01:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wi53F-00GJv1-14 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2026 06:49:34 +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 1wi53E-00GJus-2m for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2026 06:49:33 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wi53C-00000000R3Y-0VwH for pgsql-hackers@postgresql.org; Fri, 10 Jul 2026 06:49:32 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-7ff05e5d009so6777277b3.1 for ; Thu, 09 Jul 2026 23:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783666169; cv=none; d=google.com; s=arc-20260327; b=eeO7pxD7TcouV19gbuOeU3o2B0DUFUUaXUg1jda5BIOlg8Vig8rCejeTbe6d7mLgo5 apTE7Rzh/ff2Ondw/J3oMUqkKuhyATX0H6kHeZOX0FC50+4R3pIMGFuFXHQviAf6Hsx1 RQj6gK3hkVKIOrIgCW04+ORBQsDUtoN1U4IcjfZKDDFoK8utWQg7wcS8cTtifmsL4elu 3iFS9d4bDyfndLdE5NmGGDqrdPe4Y712RjTpFEum+XzD+Owbfomx7OUqNWbAYUeypR1R 1J2waWspA2CR1I5hIWRecXjc9Q2tJAAHhXDIQNGhPOtxH9HZzTT1Ux9tYC2SyyGz74sJ NR1Q== 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=MDxg799sUbfqn9iYmdk90c4ymzSTV99eMtQhw5Qj+JU=; fh=sWvuQrf8HaOhc6xA7IAjeqkjkvDrOK3p3TdCJUJsd/A=; b=anp0ijQ6lkj4qW14U7jr4ecUS2/niOiWpaL3UhNHwI7uLa8Wa23nZZBhgaI7LpnP/U oQxAjE1Za1bQBN/juOsxflvOJ2KeXOx02GbiJVVRd35EvgcyCnd10TCX7nSO1cUPJRq3 I8Vid/6Vyh252LIfAVvkVWerXzlkWLxtphk51/jE7LSHvNX35HY7ghgkLPwGubXsAMKs SSZWinE8/tGaN8PvcOIyUt1yLW5WvsvY3tzXkNmxCuBA5MiddPO05tZionuldJOqKrS6 ZVRZPOqV9/mfDHnTykxwpUTL+gvMjyt47eLJHv//s2S4AowtVWOdsCfL0Yrxs9RaH4kb wQgg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; t=1783666169; x=1784270969; darn=postgresql.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=MDxg799sUbfqn9iYmdk90c4ymzSTV99eMtQhw5Qj+JU=; b=f47UfN/tMAvL2fG2+XdFby1UyAcAHEJA6CShnERxoJ5KAkzII3ntdsiRtTsTpdpZBT FK/qePouOKtzk7Sy53scKWxwSkDDLyp5N4c5LH9fPG3/i89fX9+hAxjlfinwt0QqlJDw 27OJ3ZnDGIXIEhptInSa1femgdcpz9GrZcDMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783666169; x=1784270969; h=content-transfer-encoding:content-type: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 :content-type; bh=MDxg799sUbfqn9iYmdk90c4ymzSTV99eMtQhw5Qj+JU=; b=CUwxsAeaoOItCuN5KxYIla5ENuLiQMHDhvS34gdN+xSsu/M33Hf51WdMaYJImXKAuL fBNzaa2TKRI1ZcxWjENMT5BqKYMyHZQUFksyXwH4nTnP9NkEzzW5GWgfTfmBB7l9gs3G WwLMP/h4MSFRLz7mja6w2csvViR9u1skVP0V2wvyvqeD3jeQjdchdNakH0lIPF/9tMu8 /bafOUGAv3a6yzBd0jpc/dtCJT04FxN7VC0er14l++hFAkYVKNEVoKAtKtaWpJGGcYQV MrkZhRGOWGjS+GSdOyW5ds0LMoJvqxLxttCEVqPzs+XfyJeI7ul5SNhTaNuXXPdEDUiL v4xA== X-Forwarded-Encrypted: i=1; AHgh+RrWvf8jpbSvceS5v6AyBshBUB0n9A/2wT6JpQ+lrNs1EQhyIcqHs/YKyX55WyQO+PSqe7PHzpN1tHNEaL4S@postgresql.org X-Gm-Message-State: AOJu0YxhLtDFKw17BY8o9JplOWzz0SKcV5Sy8f8bA+Ks44d2Nb6vjaXE F5MCBqUbaBSQuwwfDp2NBhgKtNfIJxP8mSE5gIj6rvZt2J4RIJYWTcpWUQHnR5bC4HidINZXk4o JivQsLP3LydSl5gQvYyegpgOu+8MIOOljuzHZrwXBvvhU53+UpwULAzQ= X-Gm-Gg: AfdE7cmM+Kek/qSS2WGOGr36aPQKI9s9I0cB0fzUyJ8H298S4vHDAgv+3Zh28Ur+6M5 aI7T2yPidq4YQAs3c8XcyFUviEW2p6j5a4SGlnwQSolrozTWbsf8F07DI6+WN7WZDpPd9+GsRye XVVkcwetmlCI/HhBA4Uyq6dn2S3klYzXgH/SSEtLen2ykRa8HOVtlJfG8axXoqsdbEIybC8qJM2 g8VlhKiBrT82nWg+23HdAE8kCF0zZ6bVHh/j+DQ7qLokHAB2kXCyAIcN++juHF4kcpCZb0= X-Received: by 2002:a05:690c:61c9:b0:7e8:a091:6c4b with SMTP id 00721157ae682-81dbeb62a8fmr79585567b3.24.1783666169111; Thu, 09 Jul 2026 23:49:29 -0700 (PDT) MIME-Version: 1.0 References: <20260708194951.34705f93@ardentperf.com> <20260709221955.50de31cf@ardentperf.com> In-Reply-To: <20260709221955.50de31cf@ardentperf.com> From: Anthonin Bonnefoy Date: Fri, 10 Jul 2026 08:49:17 +0200 X-Gm-Features: AUfX_mzQoddpHRUZorKCNwA_vLgpcSCjC0h1U1TrvOkz3xprzlHhM5vpAj1JcwQ Message-ID: Subject: Re: hang during shutdown To: Jeremy Schneider Cc: Jakub Wartak , Srinath Reddy Sadipiralla , 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 Fri, Jul 10, 2026 at 7:20=E2=80=AFAM Jeremy Schneider wrote: > > On Thu, 9 Jul 2026 09:09:25 +0200 > Anthonin Bonnefoy wrote: > > > As you didn't have a shutdown checkpoint, the symptoms look very > > similar (though you didn't confirm whether you were using logical > > replication, so I'm gonna assume you do). > > No logical replication. Are we sure this only impacts logical and not > physical? Thanks for the pointer - interesting one. Yeah, this is only for logical replication. If you didn't have one, then it's unrelated. > We do use physical replication. Replicas were shut down and they closed > their connections to this writer instance around 04:25 just before > pg_ctl stop was executed on the writer itself. > > Something was on the writer DB's CPU before shutdown; metrics show total > CPU for that linux namespace (k8s pod) around 0.86 cores until 04:24 and > then the CPU starts dropping when the database shuts down. Bu 04:28 the > CPU is under 0.01 cores and the CPU remains effectively zero until the > processes are SIGKILL'd 30 minutes later. Looking at the last WAL record that was on the whole during shutdown could be interesting information, if you have it available. If the shutdown was stuck due to a specific state of the WAL, it could give you some leads. Other information could be useful, like the types of writes that happened after you started the shutdown, or to confirm whether the RUNNING_XACT you mention is indeed from the autovac and whether it closed the transaction or not.