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 1sTPNM-00Fxoj-2Y for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 17:20:36 +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 1sTPNK-00Bn9L-Oz for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 17:20:34 +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 1sTPNK-00Bn9D-Eo for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 17:20:34 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sTPNI-002CJK-02 for pgsql-hackers@postgresql.org; Mon, 15 Jul 2024 17:20:33 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-8138e2f2f69so36789039f.0 for ; Mon, 15 Jul 2024 10:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721064031; x=1721668831; darn=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=Is3/i+dFHD8+jghFyhnlgCCBvGB9wtliLJEhA6KlY6w=; b=jM/gt+Wm+ZS+LvnXwqrsXs9+O05rt8xqF0zbrYNO3qYTHT8XhddzZzdowyfK67cncR tf2cue8vx5vcD51e1jHGF0bJfCPgQ3D0wjxMmLt0RXqe70zlKohmvD/exJLdpkU4HYlL sIQU8YAWjbb61IuL17unzl5T3rVcEWyv+RBlmJCuYzgpx1vG9ZvYuAuASdulOBTtwGCh hRpkPV4W13lNk/h+9w5JuqYJ9oSZvIZPFnAwtxVvCRrhP5tvc7ljIpsTD514HkqSmPCy e2VsgDkiZ7O8dEqa4P94rX9ru5Exdcvc1pww+xhSbZzzyW/bREFl8iTmp46xwB1KqNJj qdTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721064031; x=1721668831; 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=Is3/i+dFHD8+jghFyhnlgCCBvGB9wtliLJEhA6KlY6w=; b=fpGH6XMelQc1PUzVYBWldL9Ca1Ki8P86AWr8Bbv936rU1MlGSA8nYX8afAkuDJS2GV 6GNqW4IXG3pRQxd7J8Wjog7ct1HvjC0ZxpQUwz2actQytXErFNnh8d5IRKnGfxEU+fPm JrYG1T+5xnF1QLbR6bolyM6GSHRvuqNlqHFazT5/0YPqgzl56MVvwdk58QxRlOJNfg4i hYLrlaVsPYACnWFYfTfB90LtX2Wo4zHt8Vka+NVF+Vuiik7GpveL2bV4G0VGROZ7oV2m EPq5AkStfVtTboPmy6aZ5AVKLGUaJ3Eh9AFxcFOlt0A6EXDMfXtXFxAYXa11TrUFa2Tc H6fg== X-Forwarded-Encrypted: i=1; AJvYcCXaShmGFM+vEYLti/r5Ycx0fhUKqw0mMajC3RaOS8hkJ0P/9evDPuZ3FwEc/WzFVSy6TV7v1O3TfL7TUVnmzbuR8TOjvHICgQDfkx+N X-Gm-Message-State: AOJu0YxjmH0wn5j1K9voPQdH1tz5QT1ABbbEwwqgjzjJ/TNJ/nZHFFIB cO2lfSsq6uTZg0unuExmVsRvtEZP42PjS5laYa49s5PEle8zYtiB X-Google-Smtp-Source: AGHT+IFJt7MxmY3i/zGNc7a2r3oT9qlpa2vDpqpth5lOm7e/oY0wB4LPsFeaNrdq9oIuuFlEh6jr1A== X-Received: by 2002:a05:6602:3409:b0:7f8:c0ed:b5a6 with SMTP id ca18e2360f4ac-81544e12519mr41820339f.5.1721064031075; Mon, 15 Jul 2024 10:20:31 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4c1e1c04603sm1321992173.104.2024.07.15.10.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 10:20:30 -0700 (PDT) Date: Mon, 15 Jul 2024 12:20:29 -0500 From: Nathan Bossart To: Sami Imseih Cc: Bertrand Drouvot , Tom Lane , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Restart pg_usleep when interrupted Message-ID: References: <373D199B-2312-431D-8018-F2808913F979@gmail.com> <3712E898-03DA-4E03-AF51-D3E24DE68216@gmail.com> <2F781744-69B8-4BC2-A6EF-3998DCCDB634@gmail.com> <01A15AEA-C35C-41DF-8E81-3B5A0B523939@gmail.com> <521A6F3B-77E1-4F3F-B15E-BCF26D52C698@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <521A6F3B-77E1-4F3F-B15E-BCF26D52C698@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 12, 2024 at 03:39:57PM -0500, Sami Imseih wrote: > but Bertrand found long drifts [2[ which I could not reproduce. > To safeguard the long drifts, continue to use the &remain time with an > additional safeguard to make sure the actual sleep does not exceed the > requested sleep time. Bertrand, does this safeguard fix the long drifts you saw? -- nathan