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.96) (envelope-from ) id 1w4yCd-002l1V-19 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 09:37:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4yCb-005flM-2e for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 09:37:34 +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.96) (envelope-from ) id 1w4yCb-005flE-1k for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 09:37:33 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4yCa-00000000liL-1RHj for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 09:37:33 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-38a27d39067so7740911fa.1 for ; Tue, 24 Mar 2026 02:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774345051; cv=none; d=google.com; s=arc-20240605; b=kLS6CbDwgnC6+l3cPqNrbvOTeeVoYxwGnWv+IfjHHRBpokY1ryzeZQIQKQ9ZW+Ug9V Hi8c0aF7g5W+ZUXV4edYVmPxaTOz7bv6NWyJKZOF/XOIQKIc7O/IlDx+ay9UMh84lZLB y7zSpjob7wk3jq+X6yM8M0YnmqmN3AcYVoFMvzUBEnS+1CyZKqP4kGZJfkdqSUcwcKs6 sCv5fzs2M2BPgIcfq5TVGue8A6It/HzUOh2LbqPgSpfAjq3MI5kzzk7+emdnW3Fcszj0 7r2Evw6Qm9B/xhtRifhZ3hAlWc/E/bvW4nvH430a5+VUJupS/gqFP7yMCU2hsge3Uw0R ikng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IR30a1qJ3cg1ptkknVPKfrOjKUHvkkpeE8Fd7NBdNb0=; fh=x4xgi4tdDukVB0fBuAIe3vORvD36rbbTBlhrrGN8QbM=; b=eSShlI527ftrk5cdtISSdJMUOjxHqsYXjkbmZkq/xa5z9JcAWSq4N7tTwBilveeLHH VXyd6HNfuKyis59JXq7P3Tr5FnXBN/waLk0n//A7zaXq6T1MA0G7leXRNNLko3xOGLWU glqMwIzXrD1NXSlNzswHJuCB9be9JIqLHEjJy6AnxdumhxkXgNt5yZu6ILETS/w3RktE xI/dkYdZfDld58iNDgOAA0Dk4diqbLKy22SQ2zRyZ54PYd78a0RIGa4Xy+5Vl8+U2bkS XBDnddEudS1quDBIiXqs1DLm5/9Kx04XHu0p9603FE6Y6jcxX9x1+E650I7qTEeIEqzz gxHg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774345051; x=1774949851; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IR30a1qJ3cg1ptkknVPKfrOjKUHvkkpeE8Fd7NBdNb0=; b=Fm7n7KFw7QFmgQa3/UQ9KDFJ6zi1s169As3SUQ6jss3baaAXBET0aMpRf+5b1RZp6P b5jKoR2S+z1cS2B2jxVcaHq7esrUyLfLiIRwt9+BLT5MsdrYiiaqpuPkLS7Cm7HEjVH8 908IZrzFTtsQ+uM7FeZV/zZPXg+hPj214BItYmkbxLN9iFrTraSpEwsjhpGI0Do+Pq7q /I2afa6XfwbQbsI1Fl82pjBwoz7VsHsRt3MSjMu2n8k68TsHSUR99AIHoZcnVu64G6sD bMa2kFb4mfCPvuV74rNL0yfPI+ehwewnRlOQKFK2MmWRwiwafu1pwmXFtYOetBrb7Cu+ GafA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774345051; x=1774949851; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IR30a1qJ3cg1ptkknVPKfrOjKUHvkkpeE8Fd7NBdNb0=; b=D/1pRexSoSI4ENCEyhx/rTMZu6TcWwA2OQWpMQmXkyaOjHHel9sbbBg6t62czcK72x mOfKloFNQ9wjyUdR0pjF0FHnRfmwlWTo51jLgb1s3GZzjCqNMI9Yfew64qsUz1VASNay ziL0dEg089UYk8z47Cwfu7gDztSzQ7ioYhBX2alvFqFxV2G/8RrUi2kheZnQmFjGIPPF /xuN0ORJLc2qp6kpFLT+vhkIC6QhNGVymIPhbMzRgjB6vsJGB/N8gkHfXf8LkuSsvnqn 2PRNR9Pqg7N9dOh2pWdjL3cn8fpmJiMNAsDqA1QmMtsRRcxClYZ+fuwsLrYdDctfIaqb UbcA== X-Gm-Message-State: AOJu0YyAALiTzFtj7vbFSdYGjGSzWDgyQAYkvJqqEq1t9AB+DNvenw29 n8ZLLlr3+YSe7PKWHXuZFtrH9yFN6oEPE+vi1nFe5BLI+QFwqxY15KyJmUj4LkWItao4TKlfsxU rrnzwxi/GWsRbCgiVpeLKFgaWsCL3P9I= X-Gm-Gg: ATEYQzySN/LduhGwXUiDYTpxNBdn83ofF73YLiFkrmpR6lGx4NZfpQh05XeQ5tJYSAi t8rGIiA+9EU5RhZT97eNONM2+wcnZABfKjiX9vTYbFJk9FCkMjBXq7PnJHyL+zc3WVNy7ZB+yLY RkLTqa5uwXIW6sjOjWzT/HZadxN37jOM2jz41IpfRcs5u292e5FTDSjUJSPBGGjEFlvoCOoH542 W8xhNnv73LJa7logMhBaTUaAbgJSf1YqY22Mhoqqau4Mx0UDfE2t9kIOhgaBexMMN6uCs3lDQM1 lW0ErCpWzs9QK+brMR/Jm30KblIerThdqc5CBqa3fVBkdbPJDw== X-Received: by 2002:a05:651c:2126:b0:38b:cd7e:3fb6 with SMTP id 38308e7fff4ca-38bf96d4b19mr61174581fa.21.1774345050441; Tue, 24 Mar 2026 02:37:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 24 Mar 2026 15:07:19 +0530 X-Gm-Features: AQROBzBMlVmzJulgV-azWwxPNW64gzsVsGqD2rsewLs0WuGYQ-7X3r8n-ITW990 Message-ID: Subject: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion? To: Fujii Masao Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 23, 2026 at 11:21=E2=80=AFAM Fujii Masao wrote: > > On Sun, Mar 22, 2026 at 1:52=E2=80=AFAM Amit Kapila wrote: > > > > On Wed, Mar 18, 2026 at 9:35=E2=80=AFPM Fujii Masao wrote: > > > > > > I noticed that during standby promotion the startup process sends SIG= USR1 to > > > the slotsync worker to make it exit. Is there a reason for using SIGU= SR1? > > > > > > > IIRC, this same signal is used for both the backend executing > > pg_sync_replication_slots() and slotsync worker. We want the worker to > > exit and error_out backend. Using SIGTERM for backend could result in > > its exit. > > Why do we want the backend running pg_sync_replication_slots() to throw > an error here, rather than just exit? > I think it was because the backends remain connected after promotion and if we make them exit that will change the existing behavior. --=20 With Regards, Amit Kapila.