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 1qqPuq-009zIm-K5 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 03:29:44 +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 1qqPuo-00CD3z-GY for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 03:29:43 +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 1qqPuo-00CD3Z-6h for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 03:29:43 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qqPuk-001OYB-8A for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 03:29:42 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3573dc94399so4369135ab.0 for ; Tue, 10 Oct 2023 20:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696994976; x=1697599776; darn=lists.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=II0S28YDXYKbTmcdDxk2KvyOuEX7THnx0PR9UNxwn+M=; b=W7JzgpJobw6tvleY/DiP8n6jDa1VjNnnUgpHaEC00ixQl9Kr6o5NWv6ML8p77mFoXr XaRdoS2b3w6FnjTGTZQjGJXHZkiRpMnw5qF0tLPGRv2UQrk5etf0y3nb3/kubtMa0sja 9lEH9hdwS9/oAKQK+hSVTX1JlkIaJw+Snxyg85aL8qrETo43orwKFjnvjP/3r2u7Z+bd jgDhQbWgPKW04sM5hZA0jo3G4JknuURGUfXHhsoFYSIH6sL0SpAt//qLzZKUnvI/ssMV +ARWAmwQ5fR2TQXWOvXkP8QArXvUVD6jGqLLs/6m+aLWBrRIRUkioj5/J1TBAsBB9vyO Yb+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696994976; x=1697599776; 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=II0S28YDXYKbTmcdDxk2KvyOuEX7THnx0PR9UNxwn+M=; b=Thi5dKmVubjQBx+XywFWWluoiKAb9Z3onZwtuO8wXf43V8APomLydqxLXvAILUEqEH /YLXsiarw4uNxOgaUCIEY+bAG1/Su4uZ3F+ESLrdW5PxvRvoH7+G/2q4dKeIUwOZ2St+ DveF3lQ5kb485qab0wNGWqAanQR73RrNwicRxKtZkB2VJgfnuSv2BYtz2k/QCNTKyg9h tc+oJ2FDsck7ZCF854lqDhASTiC9dsLGgTCvXTQBXqNqE2niyKJQjCtLcG5ATJ5VEr6T MA9dd2eGQ15EnsSZUP6N5itpslaZj1f1eaWvwNfHu1V9k2puEloqeHjWJODx0AU65hRi b0GA== X-Gm-Message-State: AOJu0YyQnklk9n9cZJezpu2zLh4J95xj1uNgk5qkSW3kbdZ6AdENrXHw j362Wv+3WOIy8LTlJejg+Mg= X-Google-Smtp-Source: AGHT+IFYeY3wwdCIBM7QzWJnpYXF/G89oXF5W69SUVq2fFXueQACxi31LYjErPgTAUB2IkREylB6Lg== X-Received: by 2002:a05:6e02:184f:b0:349:3020:d103 with SMTP id b15-20020a056e02184f00b003493020d103mr25120683ilv.25.1696994976331; Tue, 10 Oct 2023 20:29:36 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id z6-20020a029f06000000b0043a1b74a0e3sm3049099jal.90.2023.10.10.20.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 20:29:35 -0700 (PDT) Date: Tue, 10 Oct 2023 22:29:34 -0500 From: Nathan Bossart To: Andres Freund Cc: Thomas Munro , Michael Paquier , Robert Haas , Tom Lane , Fujii Masao , Postgres hackers Subject: Re: stopgap fix for signal handling during restore_command Message-ID: <20231011032934.GA847236@nathanxps13> References: <20230225192825.GA868928@nathanxps13> <20230225195253.hzp6pyllhn4kw4g6@awork3.anarazel.de> <20230225220629.GA1021641@nathanxps13> <20230226180029.djk7cth4o3o5doom@awork3.anarazel.de> <20230226193900.GA1248604@nathanxps13> <20230226201227.cner3cdicropu4q5@awork3.anarazel.de> <20230301043603.GD1453450@nathanxps13> <20230301224751.GA1823946@nathanxps13> <20231010234028.iba6wotmp22poxoh@awork3.anarazel.de> <20231011025418.GA845134@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231011025418.GA845134@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Oct 10, 2023 at 09:54:18PM -0500, Nathan Bossart wrote: > On Tue, Oct 10, 2023 at 04:40:28PM -0700, Andres Freund wrote: >> I'd make these elog(PANIC), I think. The paths are not performance critical >> enough that a single branch hurts, so the overhead of the check is irrelevant, >> and the consequences of calling ProcKill() twice for the same process are very >> severe. > > Right. Should we write_stderr_signal_safe() and then abort() to keep these > paths async-signal-safe? Hm. I see that elog() is called elsewhere in proc_exit(), and it does not appear to be async-signal-safe. Am I missing something? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com