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 1uHcZy-005zTj-TR for pgsql-general@arkaria.postgresql.org; Wed, 21 May 2025 06:05:27 +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 1uHcZw-003Llw-Us for pgsql-general@arkaria.postgresql.org; Wed, 21 May 2025 06:05:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHcZw-003Lln-HY for pgsql-general@lists.postgresql.org; Wed, 21 May 2025 06:05:24 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHcZt-0004yD-1j for pgsql-general@lists.postgresql.org; Wed, 21 May 2025 06:05:23 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ac3eb3fdd2eso1134760566b.0 for ; Tue, 20 May 2025 23:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1747807521; x=1748412321; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=gwcAhNqJvyVMMLmRe7NmQ66Rbuyx5lSYeiGxxsgMsO4=; b=kkezNWQwDyZFXH7k2VEsqrpqxEHQ0r16/gZa3l1Bkk1oLSqQI9rrDutH8DLImSgsnA T+BCmEeORfJkXSXlEXrKvEe9B1bmd1R86vRYGMyB4/Nrdx2IhG0u0eOmI+jYIHLvcT+5 Eue31hILX5q2c5uMRYf9cI9BcrWxeEaZ3dZ9mMoF6CqDl2VBPaTRmp2pm5H/rYx+XKYb 0PwtSFg/moUy53AJYHk30CE2rKZ5E/yc2piU8oBW0u17o5ozmOUjutAitPhH/FN4wTqK DlmhFO3Nw6bExi1sJn0/QRVeqL3NtwLqnBiQQV7J8Rjhu8nXv9TUv35cfjzakECmQzDZ XGDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747807521; x=1748412321; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gwcAhNqJvyVMMLmRe7NmQ66Rbuyx5lSYeiGxxsgMsO4=; b=jAo6OW6fFHxgOeLZmppL4qKOpZGoe7pvERae677ObgSMNd0YQOHhCMnGcOHkbMI3MS ZAhKy9T0ftICbxp1gTw5ZzSjKLmyWb9+DbI2JcP+BgBVpVbE51irVmtPYeBDUmMB5Qmr MscKAYtYSgtTtyfb7VaKXpenqfapyPERaLoNQZmjcwPm5x8BBXAVpgCLW2BTNr7fgeMU J4qLCGwN2hZNAikgBOkMtvx2k/0smqdvsxNJkP5gNkXySVYvWueoccCDP55jQDtdEMO4 uF216WI93dfLjwhNw4DyZHIZfmbUShDNxq+E+/XcIDcizjaNmpNIZPCQKy8VMv5nRY5O vc6g== X-Forwarded-Encrypted: i=1; AJvYcCVE3XozSbS4gsCcW70WZgD17g62jEbvJEptXLOVWNEmlCC7GRnWxsGG73CCyLZmOlSETvOoLgD8qADwvwvQ@lists.postgresql.org X-Gm-Message-State: AOJu0YwFwCWZbAXaVIkKUXxynNdEiKyzT5PZV1JpW1kSdwrgodyVmNKk BYfWM1Q18Bekg97krGpZHwXHZMgGOM7fIuXhKcglw4tgwANHs3fhnFZQngdAyPFGzXObiDKcGCE HIami X-Gm-Gg: ASbGnctgFzD/eTrdYh0PSofsaxUwuUSCmOeIzfi7MzoHyrO4Y+QPoJ4IMZcE0qBKe7C tz7P0UOZ9CoWKKGEnLF2voELgzSBB3doL8urlK93WoJFLJXnaEstV8tAwM/J6CHN++GK782Ger6 G7r2nkx7ahcrKORaOAiNoon7Zv9VaoBPmRryO57UNDwb+yFQMzE6uc3bZhelE9kYnTxb9RMrq/2 JyaH7rtIbG2ccoGLpUawdFecIwuLKY/r1B5lLgRKUJ2joGqAbPNyPt6huor5+XKKisbNj/6wtaw y7kJXwj7B6cRT/21uHKrmAqxG0rHfpMzPQHbKnjQdA78L3YnQ1lhAdGVESbAx5ow00PbDef/Z0X 1 X-Google-Smtp-Source: AGHT+IEaGssYn7UpvxmkS8pbmzxFW9+Vmv80lYjLKZkxRz5NoTCLxmEKb8Lc0teHLldB0peqMfnDJQ== X-Received: by 2002:a17:907:3e1f:b0:ad5:7bc4:84be with SMTP id a640c23a62f3a-ad57bc49034mr726884766b.52.1747807520652; Tue, 20 May 2025 23:05:20 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([41.66.98.31]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad52d06dcafsm864385666b.54.2025.05.20.23.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 May 2025 23:05:20 -0700 (PDT) Message-ID: Subject: Re: Do stuck replication slots prevent autovacuum of running entirely? From: Laurenz Albe To: Marcelo Fernandes , pgsql-general@lists.postgresql.org Date: Wed, 21 May 2025 08:05:19 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.1 (3.56.1-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-05-21 at 16:34 +1200, Marcelo Fernandes wrote: > I am trying to understand if a stuck replication slot would be sufficient= to > stop an autovacuum of even starting. >=20 > Couldn't the autovacuum process start, but fail to remove dead tuples tha= t > are still necessary by the replication slot? Why would it prevent autovac= uum > of even starting instead? I cannot think of a reason why an abandoned replication slot (not sure what you mean with "stuck") would keep an autovacuum worker from starting. Typical reasons why autovacuum doesn't start running on a table are: - there are already "autovacuum_max_workers" worker processes running - the thresholds for dead or inserted tuples have not been crossed - the statistics collector has a problem and doesn't gather statistics; this applies mostly to v14 and older, see https://www.cybertec-postgresql.com/en/stale-statistics-cause-table-bloat= / - the parameter "track_activities" was disabled, so that PostgreSQL doesn't collect statistics - the functions "pg_stat_reset" or "pg_stat_reset_single_table_counters" are called repeatedly and wipe out table statistics Yours, Laurenz Albe