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 1w9faQ-001dQv-35 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 08:45:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9faP-007L91-1N for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 08:45:33 +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 1w9faP-007L8s-0R for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 08:45:33 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w9faN-00000000pDb-2re0 for pgsql-hackers@postgresql.org; Mon, 06 Apr 2026 08:45:32 +0000 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-35c238f1063so2205918a91.1 for ; Mon, 06 Apr 2026 01:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775465131; cv=none; d=google.com; s=arc-20240605; b=E8dT7Vg3xL514fMITrasfWegot7KodaVWz3pNu1H0TogG+4sqIuL0XyZVSglKV80FH k9AhZkZ70hReSbYFtgpKXO50B0SxXV1pMfbjpqazX016i5tLIGGMLrIbo1CGihOypvRh 7aEISsZADLXyjYbQ73Zo2op53IAPvG7Iy2+SqsmOJMe87S3IGlOa1F7nNcz0a/XrNtkm QHGnjqBNNrgEp4Wud73tVdJfyHGnLLA/nFBg+dSrZHPx2rypzOXj9lTfIZiIBJymmlIP PAtjFgPtkkzPYPzKZw0ofV87wJJber5PaggRZ306LA2T9JpxxdG1bXqX0d51yrgiZRFD Oi4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Y+Bg0jszpnvxwb//3oYhgVICYs1DQucGs/T5YyVUF6o=; fh=k4/hpMBaFbaCRyZLCIx96w510Zl7aKcn9c+K18GrBq8=; b=lfmWggwuCR4FfimN603jU2Z5rjp9SH4bwp5GELcXuf3Hcfcio71iXTIgIqbw1aHA7r Gcwc/em2vdd8Ob/YOdsdmVDReXtODxqGTpj2/Bgl4J6cvaRQUN6AEpuYxg1QbddiZhTd H3uw8B+cysLM/WKE1ufg6adVJusj4+YMht0bmfjAhdzNYr3JX4EketGBVeLkAPAqPt0H YO35QtsADfF9LCPxFLrMXnZFgtHF3pIwrBZjp2axvrUL/s8fV0ZOucblPdBg9YWuiDl2 GDh26P2SqVN6vYQmspGJpBq+EhgjJTz3wzt43NExB68bSZt+Yogk4WrnLKH50Symg65J dRmQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775465131; x=1776069931; 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=Y+Bg0jszpnvxwb//3oYhgVICYs1DQucGs/T5YyVUF6o=; b=pLv3LTPWvvHoh9Zm10AVwOKTiONZgIRCOwfjwplRPM9kAWx12280p3osxAIpWGpbxJ IW+VLKfb6r+qtom4mtb1maT2UG7kpGlr1yYv4uHvYqwGlagDRJ8LuH4Ws5WPoRzIRoti 1UJoWaJY39o2Em169An8Qu/Lmc9klPOev1grvxZK56q0U6o/a1hNLZb/KffjH6PFQOcJ KG2Rml6e+R11vgXMvRoR5Gxo1wcTZ+sMYCnc6WGG3d/6R03qx7zvrWDPybTn3ajnoVwK oA9SjdVyacO2BGUjYmZq73cRmAMSvwx0Cy6HTrEMnlJp6ptvLSfFYp1Q2UbJSQUaEipF pkuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775465131; x=1776069931; 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=Y+Bg0jszpnvxwb//3oYhgVICYs1DQucGs/T5YyVUF6o=; b=rBUPdw2azdQZhsSbUaYJde41jgVE3/2bZuwd2Gc4n4uETgBUhQHxmwCNy/CX8jeYhb W7Ke8dkPYjF14lgtbiFlHfS8IAqacnyc/30iWpUBstZsWkGSIrWJe+EfmLZuc34UoZYA tHdAUPCEYVqhOjZhA867Bz6/5RUn7/F7hujFFdG8jeQwjL+S8kjXbUDpn/0vYZ0bTm/k qiUqZIobWMRWYjFiUgu9uYR/kNPTE/dNsifL1epBnLnWhSBSkm69JxYXMAk5KMtIHcmL LORFcP7R814/QbLQWuSRFOHzGM0B14r0R9TGTvE5apD78oXc4jsIAmahP/csJhObvBIq VnwA== X-Forwarded-Encrypted: i=1; AJvYcCWeXq2IOa5n0Ao0oj95TfXQKqwJpfg3QK7BEo5Jm9pvfV3Y59Ye7Dbog9t2r2JxmYLdr8rFbnp2GSGIH/gR@postgresql.org X-Gm-Message-State: AOJu0Yx0PmBXDLQQRULZjlHqpiuEih9EYiquW6xQ33e7ZtqjqvL5NvcU j6LpG95ssGCg/SR4WyUe6e3WHkrgRy91mVVTHJNPJPF6ivHoJCj0oTIelQa1zs1iWeyLEGKZmL5 ArPJigjODMcBJHn9v7G8nR757ciJenfc= X-Gm-Gg: AeBDiesIqYLzbdwPRDFkEZJ7gtG3fDf1D+LTBahdPdDka0ncJF3TTENxKvdRkZsCUIc kfBHl4DLnFLHPJtlfdRvn8B9Vf6OMVp97U/+a7I8RtZdNyNOdXtiv34djBg9arReNpcxzKYembe +koDfy+y2ufBwsJKEhOHgXPjvg5G5SBaua7wnyeyw743/ETq/yY4v9C5rx8sJ7w8A7Ox4GU7KPt QyQIr9Qzp1pnAdH/vhsmdBJ50jNECHlwxgE6aSyDMl5uR8xlvnt2cpEwSPuqe4Vy/T1E/8zIbGR 5148gKLk X-Received: by 2002:a17:902:e843:b0:2b2:4e70:6339 with SMTP id d9443c01a7336-2b2818afd85mr125506385ad.25.1775465130819; Mon, 06 Apr 2026 01:45:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Mon, 6 Apr 2026 01:44:52 -0700 X-Gm-Features: AQROBzDjp6HjWlm23_bmJcxq10TDcYSeYfeUfhtW5vPATPX23IpWru3h_aypioU Message-ID: Subject: Re: Introduce XID age based replication slot invalidation To: Bharath Rupireddy Cc: Srinath Reddy Sadipiralla , SATYANARAYANA NARLAPURAM , "Hayato Kuroda (Fujitsu)" , John H , PostgreSQL-development 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 Sun, Apr 5, 2026 at 7:52=E2=80=AFPM Bharath Rupireddy wrote: > > Hi, > > On Sun, Apr 5, 2026 at 1:03=E2=80=AFAM Masahiko Sawada wrote: > > > > Thank you for updating the patch! > > > > I've made some changes including moving MaybeInvalidateXidAgedSlot() > > to vacuum.c since the function seems more inherently tied to vacuum > > context. Also, updated the commit message and fixed typos. > > > > Please review the attached patch. > > Thank you Sawada-san! > > I took a look at the v10 patch and it LGTM. I tested it - make > check-world passes, pgindent doesn't complain. > While reviewing the patch, I found that with this patch, backend processes and autovacuum workers can simultaneously attempt to invalidate the same slot for the same reason. When invalidating a slot, we send a signal to the process owning the slot and wait for it to exit and release the slot. If the process takes a long time to exit for some reason, subsequent autovacuum workers attempting to invalidate the same slot will also send a SIGTERM and get stuck at InvalidatePossiblyObsoleteSlot(). In the worst case, this could result in all autovacuum activity being blocked. I think we need to address this problem. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com