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 1rXlWj-00CXWl-Bs for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Feb 2024 17:16: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 1rXlWi-00CHrt-E9 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Feb 2024 17:16:00 +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 1rXlWi-00CHrj-4e for pgsql-hackers@lists.postgresql.org; Wed, 07 Feb 2024 17:16:00 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rXlWf-005Zc7-Jl for pgsql-hackers@postgresql.org; Wed, 07 Feb 2024 17:15:58 +0000 Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7c00cfd7156so22091439f.0 for ; Wed, 07 Feb 2024 09:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707326157; x=1707930957; 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=yk12C9u2XKR4diYfFZl+uXdzYSJTXzNBXUmv+z0NfkE=; b=Fv8/6CylWN0lCUvYbbhZfYGmt4RL7VWGdoA3Jt8fEhZ9iE3ev/aPdnIZH3V6oxOna8 rArsi+t5qzyHuzjgUsMMSPjXxowz6p5R28Apq39CflL8AFB4FAXgjoeUttNxAkUaZbM2 Ns2GeE3w9bTPJ+BFL/PQ6Gezo3czChFRJXSDNuo+8SEX3x3SBshNRrlVuXkK0dweAxzg VUjuss0Pteafqm0IWbHim3iZAK4QohqLy2FUA/O5NEe9m0vQXYWbnPEV5clZU6SAcfwZ sVAGRU/g4QWpxCB1/0A9tE2i6BzFWW8+5Y+/frwqimci3rAJzmSPGi6fKA9Suv9pK5Mz kivw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707326157; x=1707930957; 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=yk12C9u2XKR4diYfFZl+uXdzYSJTXzNBXUmv+z0NfkE=; b=ua3jWkX121EN9o21jZS3ifb0BP6dbVG0L+vPAprCZyUf8b49Qd4mJGekiXNHLvYIv6 99Rn8wswtiRELB/aDhZ6pNGxl1CnsBDrwXlRTw5uTMj5WafBZJvUFWM6wzjDOBtZyf2f d/3PrqltrWu1lGt8O9Rhh7X62sxhJXIwto04UWEsfN11ADCUoyymwz7JfNlad+GudwrS ORAigGUTqnk3gvHGW4x3pKkUGu4JBNsCbAHj/d7ZxiBpQCSusKGFglTBqez5PHDE6li0 mk95pM6KVj0hfACjL8ihyRrZYXsmussNUkU4Ai7UGTNljP02q2ctvrLO0gKoBDWOrvVl JtTQ== X-Gm-Message-State: AOJu0YydF2baTgPphklUp7sZSEF2YM7zCIk5Li5sMYRGbLzN3C70kefM HlmbkF7djje03qdsCv07ErkrjSTG7ph3THiwNuPWsaNlhudzDzkIiPGnh/ke X-Google-Smtp-Source: AGHT+IG3ym3Hz6/Frm5C0zS4PWvKOWTiGntdqANwW8flYVPFLdn6/diirc/CW7fZleU0fD5zP20J8w== X-Received: by 2002:a6b:6614:0:b0:7c0:3b4e:8ffa with SMTP id a20-20020a6b6614000000b007c03b4e8ffamr7525560ioc.5.1707326156878; Wed, 07 Feb 2024 09:15:56 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWkUiantojLEVPlh1xvwzWJng3gpnA2lWPHdxbKPo1itp7/aDc8dd51tduCykdTWmOzOjK4CcpNGgB3iOr2NI3K3A== Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id t20-20020a056638349400b0047148f44e27sm423124jal.2.2024.02.07.09.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 09:15:56 -0800 (PST) Date: Wed, 7 Feb 2024 11:15:54 -0600 From: Nathan Bossart To: Andres Freund Cc: pgsql-hackers@postgresql.org, noah@leadboat.com Subject: Re: common signal handler protection Message-ID: <20240207171554.GA153000@nathanxps13> References: <20231121212008.GA3742740@nathanxps13> <20240207023941.GA67817@nathanxps13> <20240207024853.pg55gxzmqxi3nrmr@awork3.anarazel.de> <20240207170650.GA80671@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240207170650.GA80671@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sorry for the noise. On Wed, Feb 07, 2024 at 11:06:50AM -0600, Nathan Bossart wrote: > I'd like to get this committed (to HEAD only) in the next few weeks. TBH > I'm not wild about the weird caveats (e.g., race conditions when pqsignal() > is called within a signal handler), but I also think it is unlikely that > they cause any issues in practice. Please do let me know if you have any > concerns about this. Perhaps we should add a file global bool that is only set during wrapper_handler(). Then we could Assert() or elog(ERROR, ...) if pqsignal() is called with it set. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com