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 1rszr9-00B9Te-L0 for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Apr 2024 06:48:52 +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 1rszr8-009OzX-Kw for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Apr 2024 06:48:50 +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 1rszr8-009OzO-BD for pgsql-hackers@lists.postgresql.org; Sat, 06 Apr 2024 06:48:50 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rszr4-000vtH-Va for pgsql-hackers@lists.postgresql.org; Sat, 06 Apr 2024 06:48:48 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-22e7444c5a0so1539523fac.2 for ; Fri, 05 Apr 2024 23:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712386126; x=1712990926; 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=l7kmvJ6K2QtqmmAHgmbriwxLQ/j08Y6nMxvyaajKfSw=; b=NYGNet+S17ExXDs95uGNrDlgtAT32VfJiHNGTa6GtZmMnuC3I0I8FSs3VsVEb4otcN M4Vt6GkLkKJ830Kl/WfuXidJbbDNIgWTif4CYO4nQ2NmLLDfa8MZD7Rec0wZfGV4Q2hJ SNUk0g0niwEsVKqK99wbw6HDqL3g3cjj0l18LZjnkXHPfTagjhLF5Ww+L9fIyPcZD6M/ 9mzWWr7gIWXBZbnw7xj+FQ4Oazk0/OAeLjiRZGK2BNxqRp2Zf+Pr7rVjOyaGWgIWwgk5 Ti75f+sWsAGHB1csT+UkKHTT1QiImidVl21N3APoyW54HmFx7zOqmJ4zat9pfIjAVPe0 wBCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712386126; x=1712990926; 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=l7kmvJ6K2QtqmmAHgmbriwxLQ/j08Y6nMxvyaajKfSw=; b=WvE9M0dcvV90+8pzwgz0eyASf2j21qU2kQ3a9hLCy9Pv78jEN1bdUEBfjpN6ShOjYq zZJNaXV65X6coky0MDUo6iPi/QRUSymEL0b1aAd7lt0CyELBBIgekF/8ol9ghlTxD75A LFg8ZW34mEvfqG3KGhtT3dIOv9fABVBOdxTzEccjNBpefXvl5N3aiKkZvuBcNBAi+lT5 MlyJDm9icckOlKO0oVeG3QbFZ+y00h9JJha3IA8gse3X3MJJBZdPHXWSDvBx9Ueqr+IU GkyNorG8v96PXJFBAB3Mfd1zLrjzMzmWkpEeCwXVxykzkcdXu09IwybDAQEadx2q0K03 tLsw== X-Forwarded-Encrypted: i=1; AJvYcCUQEj74M50Nj2Tc6TDaZKbCpkRs/KONxWecal9lZi+3hbR+G8AMap8kFBrJQ1CY/QgGucfpLW0Z4hn17znPcFF46yFLJmmKbFskSEIV9wP5mYRx X-Gm-Message-State: AOJu0YxrbOu8X66uGfAsA0lC113VUoI0vnZkWSN5QwIVebRAImSz6E1g WoY6ywIAZGVYV7Cbkhs1dIaUXjvzrpn7gL9lXFtD+tJYJYvEs5VrQRn8n0NnMDqZczc7g/Wo+LB W9pDWtEWGKUqBDmAJ3OO4UylhxKw= X-Google-Smtp-Source: AGHT+IFa5e488FzHArK8VoG2xLGGJFrhqatmAAxTDJsFe9y9H9GvHzAQLnKPcJkzODreix6ZWFHVV4WxYMi/hStudQM= X-Received: by 2002:a05:6870:968a:b0:22e:bdf5:137b with SMTP id o10-20020a056870968a00b0022ebdf5137bmr4065574oaq.42.1712386126311; Fri, 05 Apr 2024 23:48:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Sat, 6 Apr 2024 12:18:34 +0530 Message-ID: Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation To: Bharath Rupireddy Cc: Bertrand Drouvot , shveta malik , Masahiko Sawada , Nathan Bossart , PostgreSQL Hackers 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 Sat, Apr 6, 2024 at 11:55=E2=80=AFAM Bharath Rupireddy wrote: > Why the handling w.r.t active_pid in InvalidatePossiblyInactiveSlot() is not similar to InvalidatePossiblyObsoleteSlot(). Won't we need to ensure that there is no other active slot user? Is it sufficient to check inactive_since for the same? If so, we need some comments to explain the same. Can we avoid introducing the new functions like SaveGivenReplicationSlot() and MarkGivenReplicationSlotDirty(), if we do the required work in the caller? --=20 With Regards, Amit Kapila.