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 1scC9X-004mbC-RB for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 23:02:39 +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 1scC9V-00HU5I-2v for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 23:02:37 +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 1scC9U-00HU5A-OF for pgsql-general@lists.postgresql.org; Thu, 08 Aug 2024 23:02:36 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1scC9S-003mVe-78 for pgsql-general@lists.postgresql.org; Thu, 08 Aug 2024 23:02:35 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2eeb1ba040aso19832951fa.1 for ; Thu, 08 Aug 2024 16:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723158152; x=1723762952; darn=lists.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=Oo3e7cX6mKhog6IWp73813V+uM4umzNNpYtMnbvh//U=; b=khMidO6YCpYw0qVpA3NI7bxINVpzXDpPBN850D4usCo9lGhYBA1cvZfjNJfMA+/LWQ 3jXCljnOIH9m8sFjQN9sPqR0ONUBnC8Iq9d42A0w210mKUWlc08c3z8T88UsZNPOGnj0 yP9UQeNF2d3Tf4DUAufp4eBoOzZf1WG0HurXYz8pYYvB67nj3yut/1OEvLRxXUpq/g+f hDOdGoxmxmR2qJYkaCEb7Dgndhx2wq6US61eMhJEg2jdIUaB5qahnh4Qzoi5GfCm98Ae cIhSGPqR0bCqJkghmSrAGGGbaS5IUqNnhky5UZDT7MpPb4JE6ldWsuKakEF7EocIt8n1 pe4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723158152; x=1723762952; h=content-transfer-encoding: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=Oo3e7cX6mKhog6IWp73813V+uM4umzNNpYtMnbvh//U=; b=ItbKLsHuvVgeJ5MBQLLVRNd+80dqlUwRBota6KkHFJ+Xq+P2f3bJBvBNc9skkMyEMP y8Ar58bsF/00J1OLb9JU9QJxqMVbB0iaEVKV0966mc96kK/j/kVOPAxFMqgZJtXSVe51 PDprWBPycNJKmeABFxwBmChByEIoKOM5RO6XuE7N+x9Iajs0+p7zlYMswfaiZBd4iTLs zUXkvKYmNX/QfNt0sQNRE5cgnWb1amYkNHqOyYYy4Vgs+7UyFJReZKhQd4WM0Wku9YNW 71mUIlSyM7Gix+AjgFaAodhj4TT2AA/62VRQ9Y5tHO3qJCmvSkdy0ExCIDQHsnUJ1jgI IHkQ== X-Forwarded-Encrypted: i=1; AJvYcCWhM/lV7tYo/vEF0CmX8AFxj6qeELzQQjJGe273YQlD0qPevp5VsEHJdeSs0zJU6Ad4WuXZtokaalTW8hozgbyHJVKcBrMEaNHO5Bdiyr+ezHH2 X-Gm-Message-State: AOJu0Yzf0sXcnnsL6n1LkmwfYremjIYYmQbcJW/dGNuCcqsJI3DuLhw9 Xee6zI4UM45Ne0SUQ3o25gpE5NEJZfE2HiCMu4cJYe2q8/EY+y0NsVeYKI5Q+koxcxzUXghPGUB lSw9AzZIlPwrbVrGBINLZkZKYW2U= X-Google-Smtp-Source: AGHT+IEhAEOxSR4hFjnxUYH/QmyS8sxamNuqLULljP7euydnRyG7TD+t36Yqx9fa3GHfQZ94XCglHleRaXSgh/JwBTk= X-Received: by 2002:a2e:8504:0:b0:2f1:5d60:8758 with SMTP id 38308e7fff4ca-2f19de8ff6fmr21584341fa.49.1723158151669; Thu, 08 Aug 2024 16:02:31 -0700 (PDT) MIME-Version: 1.0 References: <66D17234-043D-457E-8607-5126B4FBC3DD@thebuild.com> In-Reply-To: <66D17234-043D-457E-8607-5126B4FBC3DD@thebuild.com> From: David Rowley Date: Fri, 9 Aug 2024 11:02:19 +1200 Message-ID: Subject: Re: Vacuum full connection exhaustion To: Christophe Pettus Cc: Costa Alexoglou , pgsql-general@lists.postgresql.org 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, 9 Aug 2024 at 02:12, Christophe Pettus wrote: > VACUUM FULL takes an exclusive lock on the table that it is operating on.= It's possible that a connection becomes blocked on that exclusive lock wa= iting for the VACUUM FULL to finish, the application sees the connection st= opped and fires up another one (this is common in container-based applicati= ons), that one blocks... until all of the connections are full of queries w= aiting on that VACUUM FULL. I also imagine this is the cause. One way to test would be to do: BEGIN; LOCK TABLE ; and see if the connections pile up in a similar way to when the VACUUM FULL command is used. David