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 1uZOzL-002xhm-8B for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Jul 2025 07:13:07 +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 1uZOzI-00Dyv5-B1 for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Jul 2025 07:13:04 +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 1uZOzI-00Dyuu-0n for pgsql-bugs@lists.postgresql.org; Wed, 09 Jul 2025 07:13:04 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uZOz8-006Lrp-2Z for pgsql-bugs@lists.postgresql.org; Wed, 09 Jul 2025 07:13:03 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-ad56cbc7b07so888436266b.0 for ; Wed, 09 Jul 2025 00:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1752045173; x=1752649973; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=GF1d08ALueOXyQcwt+NnKTxi98gVsVT+KNcS5x5THVk=; b=GYHFlhI2HeeGwGyle/sFbfqTUAdYlptBlRvGT+FtgccLbODIFI6DuxeYt5OHdbXbar s3+Jw0hldxP82+2chdB8dp3MbFhdMUxWybrE2PQW1FiAMAyZDxvgBtbgPvrq3eBomm7H 3XuUUOcufeYv9T54FiXvvzzcnFY2DKm4kKwPL+875/GWVZX8x+G8jUyNa0USF2aiXtuj luL3mw52JXMWml6GbQN+bEx+VW7bVTI4ByRNDKGpmOsbQhsg3MMBWs1fGrQz0njd63zt 3pFMgrclFESRmCpWCk8iO1Xj4u867zNFdnMcvWan8noJnNbuXEuWiUOxJaHMyHhJi6/a mmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752045173; x=1752649973; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GF1d08ALueOXyQcwt+NnKTxi98gVsVT+KNcS5x5THVk=; b=Le2ztFMiTCPJWxiBS1iPizswsnQie721iODsSiHJUnBJRWUnc2GMG45UJL6KdlY9+r /8xeQIxzqOz8FeTavOfdk84tXcTAHj5V2CBIfxK96NMfj8MfAjBrSY+lv0yaeb2gOCXw +XPdczHN6WESpzyHCBlQbC2cLgymO3RoxIRaJZaZ9pFF1X9p+fust7ZpKEiq55lyMDk5 81zAcNRxyJZZWIF1usicateq4CmJp+BX3xixRyMJUTbygLtfIJp+5E5oabfwVVVzBCbf unonjK1obJjq4IHUbS1VuwyJ7KdSAxdHosRuQHYBnVnUTY9dgDX0NZWyG/7A07+5KyuP aZGA== X-Forwarded-Encrypted: i=1; AJvYcCXPODVMPYwlWNsBAalW0jCeNHIWJK0cGfyidr1TE6L33u+BACPlripNfs+TsKA7vSxz9p31I6pGJ//S@lists.postgresql.org X-Gm-Message-State: AOJu0YzSM6YtcpV+SOF22qQrzpq/5RoS4r7sMOKlMMz3cExofE+cHs1V BJgueXi9y0HsGzbEwUPWEyf4XdyJHp8glKw8PWvfLJsnZDeoaUjqoMkedSnIqYynFAI= X-Gm-Gg: ASbGncucWPSKvt4U1dUm44pr4vrZkEQ4RurFzrM0r+SevpVp3JmKyI3LsSE7puSyd+M KuP5rB6IzY2GLG3Jd+tx2yY0UBjRqpfKSs15HFoXDtJkxPQeMJ+r74SG1qPOfl0wQ0csnv0Zoph 1S9CF/uBkPjo/e9jSGY1NPe6KWY8BHtR4n72YecJSy7ODC2i1UynxYwuBj4jelQ6dwvj48Asyye q8Z68y+2BbOhXf6qhNpSPeRyNLZcZ7n5ODnf5i5ewXJatXDdLWyrb14tHezlwjOtsesSMNYxVn6 ADyfptuPaQ2cfCnVNuTEN7SopbkMSrozX9kOGqf/dfPxse4ZmhMEFNHUTElU4Y9JpnqnqrQEZiF ZckZmGT0kDoSoe0w= X-Google-Smtp-Source: AGHT+IEu5jdf6Ir5vyfUzmLyZyXW+cEhsX/WWOKJKRz0Uh9kpCH3eMrtzX+A6Spmkyf/Ei8S535DYQ== X-Received: by 2002:a17:906:c153:b0:ae3:c6a3:f855 with SMTP id a640c23a62f3a-ae6cf78d43dmr158474466b.31.1752045172971; Wed, 09 Jul 2025 00:12:52 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ae3f6bb3af6sm1034416666b.185.2025.07.09.00.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jul 2025 00:12:52 -0700 (PDT) Message-ID: <1cea80b2ed4f355ae6a68e36f56a1410b59ea4a8.camel@cybertec.at> Subject: Re: Unexpected behavior when setting "idle_replication_slot_timeout" From: Laurenz Albe To: Amit Kapila Cc: Tom Lane , "David G. Johnston" , Fujii Masao , Nisha Moond , Gunnar Morling , "pgsql-bugs@lists.postgresql.org" Date: Wed, 09 Jul 2025 09:12:51 +0200 In-Reply-To: References: <30e91649-06dd-453e-8658-5f4acd03a3bd@oss.nttdata.com> <686577f2379e4b978803e72746dcf0dd7baf3937.camel@cybertec.at> <70b183fb-f66e-40d8-b0de-be8c1052fa93@oss.nttdata.com> <472687.1751731008@sss.pgh.pa.us> <474268.1751731988@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-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-07-09 at 12:05 +0530, Amit Kapila wrote: > On Tue, Jul 8, 2025 at 10:23=E2=80=AFPM Laurenz Albe wrote: > >=20 > > On Sat, 2025-07-05 at 12:13 -0400, Tom Lane wrote: > > > Oh, wait a second. I just noticed that this variable is new in v18. > > > So there won't be a compatibility issue as long as we change it in > > > v18 too. So changing it to a base of seconds seems sufficient, > > > and more in line with existing practice: > > >=20 > > > Using 'ms' seems clearly overkill, but there's precedent for > > > timeouts measured in seconds. > >=20 > > Here is a patch that changes the unit to seconds, like Fujii Masao's > > patch upthread. In addition, it removes the now unnecessary injection > > point for the TAP test and tries to improve the documentation to > > address my complaints. > >=20 >=20 > +# Wait a bit for the replication slots to become invalid > +$node->safe_psql('postgres', "SELECT pg_sleep(2)"); >=20 > Is it a good idea to add 2s to 'make check-world' for one particular test= ? That is debatable. I thought that adding two seconds would be worth the advantage of removing the injection point that only fakes the timeout. We'd get better test coverage. But if the people who run the regression tests dozens of times every day object to the two seconds, I won't insist on this part of the patch. Yours, Laurenz Albe