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 1sdtkf-0020OH-NF for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 15:48:01 +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 1sdtkc-004qkM-Jm for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 15:47:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdtkc-004qkC-7B for pgsql-hackers@lists.postgresql.org; Tue, 13 Aug 2024 15:47:58 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sdtkZ-004fq7-AT for pgsql-hackers@postgresql.org; Tue, 13 Aug 2024 15:47:57 +0000 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5da440d059eso2094001eaf.2 for ; Tue, 13 Aug 2024 08:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723564073; x=1724168873; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7TzX30cHuIEf8Csv6L6cPUgXcGZMBg/r32WsmQpTGQ4=; b=WIODQ7XQNQjg1lnK1OdKLFEyeb9zL5fpMWiG6j+adQz7XjlmogN59s5SPtfZIOdgNS g/vLkZFa8Rfh6M+kzkEAQceRZPCTlJrabwWwiimXZiqm60QHHhrdMzrVm2gf9aunUWCr JfcxWV0rz3dFEcR1kVXI/MkP/GIuGUrQX2sMQypon9EC5TscFo8GgfwYu3QdQOSW7YbO slENjTx7lI1BijPfLvGJ9bs1r1eZgKitUHatJbOd3mJgg1p+Xtg2/fVSJRQhAOQPrgjL WwyFJSsCcZhsryU4KY3VPDYmrAuRzDrmThZ10VQECyPgmmslhQlvkF0jAssGu2Falz1X 10Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723564073; x=1724168873; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7TzX30cHuIEf8Csv6L6cPUgXcGZMBg/r32WsmQpTGQ4=; b=Nu3aOYIvjo2FhpQB0lTRrO1w78XhYBbUYs18Pr9sGopjd03MekiD400okbaEZcrE7O IsvC/XS4nFOr6RHzNkI0QUS01UwjKyV2WibqxuZEElA3Nc/VPCzTJQ2J6Gr5UoX/HKyi yzmS0ka97co3fxGxveQgl2Ip6F9b6M/XFnac1U3ha8kJmrCRQFelXnATba/BhnBaF2Wf 37yfEUfdPdstX7CL/zpmL/0cE4CzKDcyopjbNJTCms9vuN3tkD4fVSqEZxN7XDOmTwMd qinD1s+SUV9v1GnbMyGrzMb627SlRyehuMnv7fTp0x2vCxC6ztRNq5YmqM1IfNlY9Upn YXzg== X-Forwarded-Encrypted: i=1; AJvYcCUIJye4Kio2PtT2V+qTcEognK9xUUIJiE+4V1ryQjYq6gkW4kFXbcla6wQhzj4MmkVYwg/fqkgnxL8Y1ft2@postgresql.org X-Gm-Message-State: AOJu0YwPFZnSy5uCYtTQdTzxIMl4TVukFE7ywFOsD8Q7tOJSSJsA/8oE RBcNcV+kj5JmVv3dJ7xK67O8Pbte3Y1TNtoqtGrUlwSZYW81hfqi X-Google-Smtp-Source: AGHT+IEnp2czoHjW0bjZuq1a8nzd/Hcanr93WTvc8oxygEzUK+yNRYqoX37le8JSAjucvL2PhRD+WA== X-Received: by 2002:a05:6358:9216:b0:1a4:617d:6fe2 with SMTP id e5c5f4694b2df-1b19d2b9fa4mr477468355d.6.1723564072687; Tue, 13 Aug 2024 08:47:52 -0700 (PDT) Received: from [10.81.2.40] ([15.248.6.116]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4c7e05208sm348004685a.116.2024.08.13.08.47.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 08:47:52 -0700 (PDT) Message-ID: <90ec1618-58db-46b3-8c9b-13616ac839a7@gmail.com> Date: Tue, 13 Aug 2024 10:47:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Restart pg_usleep when interrupted To: Nathan Bossart Cc: Heikki Linnakangas , Bertrand Drouvot , Tom Lane , Robert Haas , "pgsql-hackers@postgresql.org" References: <526E6A51-FE30-47C4-85C8-F2D18877607F@gmail.com> <2b5ac681-11d5-470d-af40-89ead9a868aa@gmail.com> Content-Language: en-US From: "Imseih (AWS), Sami" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/13/24 10:09 AM, Nathan Bossart wrote: > On Mon, Aug 12, 2024 at 05:35:08PM -0500, Imseih (AWS), Sami wrote: >>> Skimming the last few messages of that thread [0], it looks like Bertrand >>> is exploring ways to avoid so many interrupts. I guess the unavoidable >>> question is whether this work is still worthwhile given that improvement. >> The way the instrumentation in [0] dealt with interrupts was too complex, >> which is why it seemed better to handle the restart the remainder of the >> sleep in the sleep function > Can you elaborate on how it is too complex? > [0] made vacuum_delay_point more complex as it has to instrument cost_delay at an interval to reduce the number of interrupts to the leader. On the other hand, with allowing the sleep to deal with interrupts,no additional logic to space out instrumentation is required. Regards, Sami [0] https://commitfest.postgresql.org/49/5027/