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 1sdtts-0021dS-2V for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 15:57:32 +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 1sdttq-004tUB-PJ for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 15:57:30 +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 1sdttq-004tU2-FE for pgsql-hackers@lists.postgresql.org; Tue, 13 Aug 2024 15:57:30 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sdttn-004YyW-Nn for pgsql-hackers@postgresql.org; Tue, 13 Aug 2024 15:57:29 +0000 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-81f86fd9305so302609039f.0 for ; Tue, 13 Aug 2024 08:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723564647; x=1724169447; 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=zYef/dLbobzsDzlny2tZsxI1OpQka2uW/SuAj4I704w=; b=PLVbUk6mP8PCt7eLgZ2jAqwmgx+7MNIdg4b+PeZ7TrJ+0P4ybjIRE8QgFrohyv5JO4 9Ul6UqLLyyQ5SARG/F+EHPSEcGMWgzyVCBy3gtw2DqEZm0Clvg46PwVZlfgwyxmpPAmV o4vz8EN1PiqBCqvihXROXTeJ7VCbrD3oU6FwFjBxSd3RrTTasnSYFtZPH7/s5AghMIgg 8aEXqauRe6ojOwrOjaRPm38cZf+9OVsJXZIbd1OLpMSvRBeCTSThcGln2jlA5no2ckDE KfPydp5blipsxww7GSFjV/RbuZt+n89QB3f2Vd9QrUa5NwSInhLRza8NGs7DSiz0bqll Zh1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723564647; x=1724169447; 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=zYef/dLbobzsDzlny2tZsxI1OpQka2uW/SuAj4I704w=; b=VHp0THFn2xE0efRAzy61IhXUF102EqUWgqchoZT2kMaQeoJxONDU1TUl1aQWk36hKM AQBipiWo1AxYRbfFxBhhnru51ypsUUIeZHfoNe0PRWTWLgDy6n7GzImW+f+lKPP2yeHm 3DhXGP0Bq3L8GIDzkPjB1ZYGG/8H5GUJ8QNZDoFynNjF4WqY9MM50KEnNWnrSfHDv3E0 S9uyuI23MlkAN3HltpGlJgUIC5Xv4ZS+YuT/TOZaZTzQlDHO4xXp5pvOILTEqBZplAc4 2iZL819qcB9uFiEtTCm3+bH+GL0ks8/b6C9MtQPNj9BDAcXrr3xVMZuc4KIYwt9Q470P 8Kjw== X-Forwarded-Encrypted: i=1; AJvYcCX9TtI4uD5j7Tv/53O76O6w6g3yq7xLY8Z203pA2exLGGXbKv4ZH45kGIHQCCRSKqi2lxjNAgyLXoveNXTU89mSvEmZFz+UfqqOw5ug X-Gm-Message-State: AOJu0Yxfp6lxznsR56GafcWrd3442sws1x3hTU5RW27w8+fXumCPP3r7 rfN/ukNTKsoEXaCvR0KYtRDJDfUP4p0jZIgHPpHtkZDL6Pgdfbtm X-Google-Smtp-Source: AGHT+IGEKcgaUJT9eeD5gEuGBTV86bWJbYC2fDtc+9LUCwuZHd5bYCxx27YAkzw5qyYcanc7ZQ/LPw== X-Received: by 2002:a05:6602:14d1:b0:81f:b53b:728d with SMTP id ca18e2360f4ac-824dacf1fa8mr7520239f.6.1723564646727; Tue, 13 Aug 2024 08:57:26 -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-824da4a456asm6113639f.51.2024.08.13.08.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 08:57:26 -0700 (PDT) Date: Tue, 13 Aug 2024 10:57:24 -0500 From: Nathan Bossart To: "Imseih (AWS), Sami" Cc: Heikki Linnakangas , Bertrand Drouvot , Tom Lane , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Restart pg_usleep when interrupted Message-ID: References: <2b5ac681-11d5-470d-af40-89ead9a868aa@gmail.com> <90ec1618-58db-46b3-8c9b-13616ac839a7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90ec1618-58db-46b3-8c9b-13616ac839a7@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 13, 2024 at 10:47:51AM -0500, Imseih (AWS), Sami wrote: > 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. Sure, but looking at the patch [0], it adds maybe an extra 10 lines of code to limit the reports to 1 Hz. That doesn't strike me as too complex... [0] https://postgr.es/m/ZnlPZZZJCRu/8fka%40ip-10-97-1-34.eu-west-3.compute.internal -- nathan