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 1scUuB-007qw4-Fz for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 19:04:03 +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 1scUu9-005Rmt-Cq for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 19:04:01 +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 1scUu9-005Rml-2M for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2024 19:04:01 +0000 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1scUu6-003vbW-KM for pgsql-hackers@postgresql.org; Fri, 09 Aug 2024 19:03:59 +0000 Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-39b3a4d2577so7816385ab.3 for ; Fri, 09 Aug 2024 12:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723230238; x=1723835038; 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=jV8xOI55YBPeirogk5c7tVT71lsJvNHLulPly/BNwGc=; b=dS5TsCOWZFoUtG+Wy3zJUW0a7GoRpno648C5sZV1Hc5z9zutr0w25gl5jv9fUNtoL/ TWNx7srRqHp6c6Z9dn2Z+ngQYt0CV1En1Ro7oHBjQO5YpV3/MUFdm1ry2+HEA0z9YjnK c3onBdW+iTamn6LC6d9xaSksT4qLE/+6WRtFVwyFgnxnbzc/LNCAui5w0vJj1b3cP0tw 0JF6D2NoX4JOKr8YqcC3FDJfZM6j0i3GIRLHsbqlzOj8MQ7AGFg/bz9E8Nj/F994L3J5 wtw7viayHqLjfPqZcY2JzyrA882SPwMD/oSDX99lMvztfV4+X8inl69WYZFu+aeS92OQ w1nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723230238; x=1723835038; 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=jV8xOI55YBPeirogk5c7tVT71lsJvNHLulPly/BNwGc=; b=AkCUPAJL49k9L+Yj6eSWUN9wVcDYvXNqdGv/5qxqLcJEzf+eNeSL4015xL3tZopGLw jg0g/G1yv2PfpDQPgJY5Bh/jDWyPzR0EjftjXOmNbIrtP+CyBNaacatR9qQsTyNUleaK dtpM6FGsrfXthoZZKjH977dAfaX1vrnlLOm3U0cl4ijlZ2BVnLOps7Rkj334httUFCfd H5nZZUlStlDdBcouI54UpD0zysE/RLiMRELi74YkTUBdaRr0xwrvHe8iOeVo5T27LiJD yKdJUZdRtCW0VOOQ/SGWTusnnOhJ22JCd1zp2kp4I3ZBgz1Ieivwi/7RqUwFKdSzAB2v RToQ== X-Forwarded-Encrypted: i=1; AJvYcCVY2PZO84uUtb46TLb/OkXwycYdB/WYorFL0YRJ/k4HMryevl/+cBuYiF2K12oZm7dhv0VEHLQmiKjfG+8VV+5Z/SEMCfVaP7Xh2GQe X-Gm-Message-State: AOJu0Yx3dJgR06C+EW/aQy/g0ISeFvB79alfSPdbefGhbfabjunEST0G TmxRYqV7Bn59V3OFJKb3heBcuJjBtxoM7EhMkoC8DvGs70VgqTSn X-Google-Smtp-Source: AGHT+IGfw+ZWMZTT3DpH5oNumUUjt9N+iLAlM2dUdjurlgO6aAodDNDE98EKZGNH77Iu1rBJrObWGQ== X-Received: by 2002:a05:6e02:1a6d:b0:39b:64b9:a4b6 with SMTP id e9e14a558f8ab-39b7a467abbmr29849465ab.18.1723230237763; Fri, 09 Aug 2024 12:03:57 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39c30ae363bsm403485ab.75.2024.08.09.12.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 12:03:57 -0700 (PDT) Date: Fri, 9 Aug 2024 14:03:55 -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: <33287B8A-3CA0-494F-87D3-C9D85C6468FE@gmail.com> <19E276C9-2C2B-435A-B275-8FA22222AEB8@gmail.com> <50E1D6AD-3E51-4E45-95A7-7B20DC037DCB@gmail.com> 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 Thu, Aug 08, 2024 at 03:01:20PM -0500, Nathan Bossart wrote: > Thanks. This one looks pretty good to me, and so I plan to commit it in > the near future unless anyone voices concerns about the approach. As I am preparing this for commit, I'm wondering whether it makes sense to name the new function vacuum_sleep() and keep it private to vacuum.c. Nothing about this function is terribly specific to vacuum, and it's not inconceivable that it might be useful elsewhere. Perhaps we should move it to pgsleep.c and rename it to something to the effect of pg_usleep_non_interruptable(). -- nathan