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 1w3zZB-001l22-23 for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Mar 2026 16:52:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3zZA-00Avnt-0B for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Mar 2026 16:52:48 +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.96) (envelope-from ) id 1w3zZ9-00Avnj-2E for pgsql-hackers@lists.postgresql.org; Sat, 21 Mar 2026 16:52:48 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3zZ7-00000000N29-0awF for pgsql-hackers@lists.postgresql.org; Sat, 21 Mar 2026 16:52:47 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5a13e1cfa45so1698184e87.2 for ; Sat, 21 Mar 2026 09:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774111963; cv=none; d=google.com; s=arc-20240605; b=F5J4BO3O0C3rHOn52Fj25KQBGB+rXK5Y/PjnRI3ZdR1A1pbiZs5g+Oyos+2NqI1fuL xvjB/HRkPe9oUCGBWKDOtILSqJ0L1BW5f+TI5lndwa45Of056zw1TgX2TTl06ZKrA5LK S0HT2IDKKZ8lqKnMucY4eG6DqOH83s1JE800zSqyZah8TpJ9gj2TItkgoosf8rTjbzYc rDHaQViWYyblAG3C6Tb2j1bqzKSZ2twBW1GHu7mFHUaGRbZuAsDBeXTZJpyLF/pZDjMe s9evE3SbEucWTRWqoNxVPwaNx1ejgZXcOlCbVx2wUhAFi2Fm57a9WfaBjWVziJBko3W0 JvaQ== 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=xB3TfsBsUej4utJv6MmBjYodd3Mt69j9tupMIB65Vs8=; fh=x4xgi4tdDukVB0fBuAIe3vORvD36rbbTBlhrrGN8QbM=; b=P2nMSPpaacPxdY5zQ616ieoS6ibGVRRU23U5WpQoaOCoTdBLmByTW+GCIpoPz/wlTe zEJ8NR3RpXz9YQOu63HsdLsynsvk3HCEmVGPushAveIH/pENHJ2yxMGLvysJcmRPDtQc I9vmchIJdGIkj2JybscVuCdcq3ypil64PYfZH+qO4ZB0g+ZoCN8nq6RE0+y08CLp25oW A9u5JuyQ8w2GRNfDSRrACj3mGmsyCh1mYRDDoYCK8ywPIJ9X+PABOWuNoL5DeD0qH5oI b/c1SJoxuDQ3b34H5tQdPuS4K+aR8n4zt0bS2RR+nn4FFc/hwEB9JDRnGLDUSx8lmNVc 2GLg==; 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=20230601; t=1774111963; x=1774716763; 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=xB3TfsBsUej4utJv6MmBjYodd3Mt69j9tupMIB65Vs8=; b=mLpom0Wl9pOEDUiCtmE9VZZwVPEzHwua/SzZvAIJgfqaXfJt6RLj0Vskne9GQZ/+5s LBq21ZcyEUydiPZi2Wg/2UY4DfanQtbYYi2qPPjfgZO54Ysr2gh5vFMWEFfnoTSzqem4 PEUnufLsfKAVGxm8SLt2EUnQ504BMo3GabdR80XBE6a31RSbnTfFKQw0cGEZf0To72mM 74QPejs6rbGNSlYjU+t+VTLGdaRItTHxb4zfd9CoigiZ6YpFpVUfhvQ0S71CrXWtpWA5 kcs4y2Udp1utMSSSCOZ9Wvdq9yo6q5bx1HHx951laSAIkWvlz4ZJYgURXidAM8C9zzqa ONCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774111963; x=1774716763; 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=xB3TfsBsUej4utJv6MmBjYodd3Mt69j9tupMIB65Vs8=; b=DYZ0douBpGvmD+yWMfoiJYfPbWYKnjm/xqo8zsewYT3wyhyPKrplmsQbOiOq8pNDD8 0L/RWoQUeZxHKqrQNy8JD7z4Jeug/tBG5hkYVytkBjovw2/AQMQCl8FJRU3O8ORqsYV3 sw3UPspSqPp/2BWDSzvw21HPnEWVIrtPFGJZXRImF5gbeNt2Frc3whgI69TQIm0eE+pF 8DrblShcetdk9djVshdV9vWF3mZkxyOt+rRLtro6sMfOarDc3NP54pWXq28H3SO7hTah rtF4Cws1F8S3NpGcCSqw3i1VcxEWAnnhfIHtF5qwafiEcG5TIWQ0YzhE76luL1xvAOBc dAOQ== X-Gm-Message-State: AOJu0YzcGLG4P++SJLo8vWGqWA4FavZUpXsFqLwhuX+9LQenLCV0M9Rn d8r86DAGMiYlQa1ZFp5FZpn6zSDhDdkeFzx7/Kubr+H2O4xDgk3p/z8PagdssFpBKSIQd+iTmHt iKir2OxQr3uLT2JR66+U6lWowdAlr0NIQPfBollzYig== X-Gm-Gg: ATEYQzy4TUDk8ZGMqwOuXGR8DXtjYZ+fypM00eQBRLUZGTNwV5e7zy2ZUwAdTrwgEnJ 50OCy4JFfBSvGUF4HPWCoDpYjnpxeyUVCVWyu3kdXg2oHFVsdNs9DWUHLJDl0qN6YGeohmUJ+ag RNtvGO3uiNjcMSRyeuUcG9u/qzaPIfs9IeBCgb2Rzvs97oaLcckFQmzyR++HLYUggceEAHuTUJM 9av6YKguoOhx13oSgK1hD9ut1wSr9Ym40vnvSlDufGh8EcRyRW8bDG+T/oo61g0hjdCYBHlH6Br 85D+4EiH+4tW8S6LBnD0C9jmU0T2HXYShzeCnc1PQyhg2nyUw68FQ5cwNIO/CayJJ3FExOaCnw= = X-Received: by 2002:a05:6512:3e0c:b0:5a2:788d:c856 with SMTP id 2adb3069b0e04-5a285b16810mr2076742e87.15.1774111963177; Sat, 21 Mar 2026 09:52:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Sat, 21 Mar 2026 22:22:31 +0530 X-Gm-Features: AaiRm527cUwTGVbnXUwy_k9dzwJMZrttCn-3os4VP01TPJZ6jiP6pSFZiGoOis8 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 Wed, Mar 18, 2026 at 9:35=E2=80=AFPM Fujii Masao = wrote: > > I noticed that during standby promotion the startup process sends SIGUSR1= to > the slotsync worker to make it exit. Is there a reason for using SIGUSR1? > 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. Also, we want the last slotsync cycle to complete before promotion so that chances of subscribers that do failover/switchover to new primary has better chances of finding failover slots sync-ready. --=20 With Regards, Amit Kapila.