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 1sRItv-00EOXd-E6 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 22:01:31 +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 1sRItt-0005WL-IG for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 22:01:29 +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 1sRItt-0005WD-8M for pgsql-hackers@lists.postgresql.org; Tue, 09 Jul 2024 22:01:29 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sRItq-001GkO-Gy for pgsql-hackers@lists.postgresql.org; Tue, 09 Jul 2024 22:01:28 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7fb008db12dso99979339f.1 for ; Tue, 09 Jul 2024 15:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720562486; x=1721167286; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dhtPtelwduY1x+HokUVagSFv+txskpgqeZ6JYJjBgAk=; b=fDzM+/Z56hpAcNV2iqC53FACKg1WgstLSqT2GGX/7B6fa5posyO5d0NLuEPG1d9JZn XperiTLg+mH9Zno/8H8EftvxNPpxaP7UcXaa16aohWSYezTYNkWZ3Im2/zD0J1bV1Pm7 xRr9DJinxsyJi54wsl4BHd/m5ZJsFnlTJm4MoClU7N4dzkCc8Q3vSeLfJUXH2ou8QuKu 7FOETtul2QABHgjupgM/sfy1aHRg5Hb6RyPrd0lr3gHKdcDxG6gLG4Q3vrKP7rEynjf2 XbP6zpzIDdQ19ffeNS5fe2/26nKmguBqwCIa4l4LInj2okNYUPU3eH7OilR5ia8syKZ6 dHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720562486; x=1721167286; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dhtPtelwduY1x+HokUVagSFv+txskpgqeZ6JYJjBgAk=; b=PWn8WgTqCLA0ulGN7EqkFP9cHy8Mj6x5G11kSPBxlfBVPEV42O+taV+GYBhw+un6pu JwRtf9H4GN29EzPxRaUsYPw6TdoQCmBXEIPZRGpzVpZcoEeSmo6SfxDAspGsisoPPSTX FJjH3HXDlmoHTDGjgBcHZKMXs42zPoDnJU1vaOvCDtuo0VfpFlWMGYn/4dRDrVOEJihy N5xHy/YQ+5SNNpopqRuOVFRxjp5z64XQxfN8/3S7ds3wJiKe2arUHG8Mftoff798pQFJ 0b1mqF84iNfCEP8v2PvAc2mIHPIvdMs4KZK3faFBobzT1g0D1PUSe1tncHUcPR2eMzMh Bjtg== X-Forwarded-Encrypted: i=1; AJvYcCXxYOZhy/gvkXTCaI57PpGpgnEe6v66eEWFGhiROZ5Wiyn3pJflm2N4ewkocwmkeO0h5AJhMm73Nqp4P6EbbGFzY9Pc+fBBYOn8jg45y/qo5wFc X-Gm-Message-State: AOJu0Yx8DBcRRHbfsmlNX1gt62A1pF5l9JoOEF7lAkNi8RkXdO3FPtf/ c2TCMiFruNwizNDdHBsJnDfk4YcDbngIJzqNF6K+b5gYJhLjvSAF X-Google-Smtp-Source: AGHT+IHFrWG29PcGJCAKIBBpbxup9ylEaVpZyfijigntz/jqSZbDR3BI38RoN+vkeyLnKvlHxCkIng== X-Received: by 2002:a5d:9703:0:b0:7fd:5a50:b217 with SMTP id ca18e2360f4ac-7ffff7672b3mr446509739f.3.1720562485591; Tue, 09 Jul 2024 15:01:25 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-7ffe9212577sm76026839f.7.2024.07.09.15.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 15:01:25 -0700 (PDT) Date: Tue, 9 Jul 2024 17:01:23 -0500 From: Nathan Bossart To: Bharath Rupireddy Cc: Amit Kapila , Bertrand Drouvot , shveta malik , Masahiko Sawada , PostgreSQL Hackers Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 24, 2024 at 11:30:00AM +0530, Bharath Rupireddy wrote: > 6) Vacuum command can't be run on the standby in recovery. So, to help > invalidate replication slots on the standby, I have for now let the > checkpointer also do the XID age based invalidation. I know > invalidating both in checkpointer and vacuum may not be a great idea, > but I'm open to thoughts. Hm. I hadn't considered this angle. > a) Let the checkpointer do the XID age based invalidation, and call it > out in the documentation that if the checkpoint doesn't happen, the > new GUC doesn't help even if the vacuum is run. This has been the > approach until v40 patch. My first reaction is that this is probably okay. I guess you might run into problems if you set max_slot_xid_age to 2B and checkpoint_timeout to 1 day, but even in that case your transaction ID usage rate would need to be pretty high for wraparound to occur. -- nathan