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 1qqeTK-000PLm-NK for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 19:02:18 +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 1qqeSK-0000Jd-3e for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 19:01:16 +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 1qqeSJ-0000JQ-LK for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 19:01:16 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qqeRB-001CnY-NF for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 19:00:09 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-35749fd39b6so447365ab.1 for ; Wed, 11 Oct 2023 12:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697050805; x=1697655605; 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=iwoxAEuHVEWk23ZL8wrs+sVCQevv+B4H30KWMLhnHfk=; b=XT4eLM6GOfZl01AmKgUMmwrr1rtnwjObXn5wkNytvRP6HB5wpzQJzZoToC4JgIJia2 jLeOaU1oV1EXEYYCzitFJ1s+zDWte9EQHhkz+zKTXDDmBCCpPc3UsbaacbptpvO1K2C8 yaqeBzcHWnJrx/Y0nDNTutsQnIU66o6lJkvHFLPyrbPGdvwSB7em36E/EH9tHcS6ygr7 TjAEojAwndhjJLw4/+B3ze16NaLWY5/y5A+fP/41eGUz0NqNVMJOouk9RDobQ4l6g6ut qURnuTseCSB4kHZ7sM1Q+/rmiyXaZhpu8v6SP3FY+x5FSR6SF9Ho/yHs+os7lFk+1EEB 7y0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697050805; x=1697655605; 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=iwoxAEuHVEWk23ZL8wrs+sVCQevv+B4H30KWMLhnHfk=; b=Pbe+EKFx37K/Pu0fn1z+JAfvofs0h21+Y+JEU3roZBE9usw9yeJDq5SnRKVyXecPs7 JLmK6cgT+dK+EKWNvIUu9C71AscZSMv2xo9gdNxCF+sqGiMqbkCod++rx1YUTWG+5lJ0 e//yXJ6MunodeLjOuPOSP8J6fYX5mKG2JXw9lKnxTw3pm50XnkNBuxd5fWNerZ7mIeJ7 4yPSnccZfhNW51/8GssfWFAEFbiJ0dqHzCl4IZcs+v5h18AEUBnCyFX3i33Pckx3fwYd +aoTglAFa6efCiiGYjes6VT7I79e6CmX1Q/uwRjloocDOQ04JFQFF2JyVgD0+o4bCAn3 UnOw== X-Gm-Message-State: AOJu0YzOqAm1GfuN7fCciFdYyy44H1+q1ChRUkMXu0QnMDiVeb/WY/47 1l7tsLcxRqXyzW2YRUjxPIU= X-Google-Smtp-Source: AGHT+IFlxmWiTlJ1/2fEsYs3xbL32r6jijSzmaX8pG7NRwG2yh4sfI/fLV0wWRegJFj+/J3IRNCukA== X-Received: by 2002:a92:c262:0:b0:349:927a:5d85 with SMTP id h2-20020a92c262000000b00349927a5d85mr29438139ild.22.1697050803914; Wed, 11 Oct 2023 12:00:03 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id p11-20020a056e0206cb00b003514ceb5ceesm129858ils.46.2023.10.11.12.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 12:00:03 -0700 (PDT) Date: Wed, 11 Oct 2023 14:00:00 -0500 From: Nathan Bossart To: Michael Paquier Cc: Andres Freund , Thomas Munro , Robert Haas , Tom Lane , Fujii Masao , Postgres hackers Subject: Re: stopgap fix for signal handling during restore_command Message-ID: <20231011190000.GA894647@nathanxps13> References: <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> <20231011032934.GA847236@nathanxps13> <20231011033929.j7doct7wzmyw6xiu@awork3.anarazel.de> 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 Wed, Oct 11, 2023 at 01:02:14PM +0900, Michael Paquier wrote: > On Tue, Oct 10, 2023 at 08:39:29PM -0700, Andres Freund wrote: >> We shouldn't call proc_exit() in a signal handler. We perhaps have a few >> remaining calls left, but we should (and I think in some cases are) working on >> removing those. Got it. > Hmm. I don't recall anything remaining, even after a quick check. > FWIW, I was under the impression that Thomas' work done in > 0da096d78e1e4 has cleaned up the last bits of that. StartupProcShutdownHandler() remains, at least. Of the other items in Tom's list from 2020 [0], bgworker_die() and FloatExceptionHandler() are also still unsafe. RecoveryConflictInterrupt() should be fixed by 0da096d, and StandbyDeadLockHandler() and StandbyTimeoutHandler() should be fixed by 8900b5a and 8f1537d, respectively. [0] https://postgr.es/m/148145.1599703626%40sss.pgh.pa.us -- Nathan Bossart Amazon Web Services: https://aws.amazon.com