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 1w8BdU-000I2P-0H for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 06:34:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8BdS-004BTk-1E for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 06:34: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 1w8BdS-004BTb-0I for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 06:34:34 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8BdQ-000000008fI-0pZK for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 06:34:33 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-38bf47a6f02so4770241fa.3 for ; Wed, 01 Apr 2026 23:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775111671; cv=none; d=google.com; s=arc-20240605; b=R9yoKaZBZlP6Tv5+/GMys3kVAIqDWOcJ27GgQdDhgi69OBNfkEjopvOapO7/+EqyRU iZ6x29n851/ausISidq6t7tYR8vpo/fkmZJhhl8+EsWK1Wkj2A6Oz6pPRqRpAPQ98tzp 7rklAKcfc2NgnUVkFA+Z4uilD9biV1i+NKU3tWzpbNZuWiv08hquaa0BMsywfA4S5pCj a/1i0Sq925N5Y5gfaCxVexxqpzrsvoGfIuVKlckQExCU3hdsgwirMgWNLMtQjJgX14ba gezwABPaSH7GbI1Ov9EvvlcNARB9VyfAV1Z1JP1a/rRfmVHJHcv0TgwIeZv2aeX9vtpk 7Kfg== 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=znZUH0RS002ExkldJKybpi0rQ0zl7NxavzUQAn1CUU8=; fh=8uG2ME2RGXw8AO4NBtvuEphgzKm71dDHvhFiB8/rqf8=; b=Xr4JHEdtWEEHeoOSeuggoyV+vEhrX7T4Nlbyt8ghD4TeRtkGHRqBcoKLKin8I6ivhC cFNh4ILUzN/G+cGnkfkr6sp75GNHUUb7FW92SRz4EoU0ODCNBHRRoxO+DdsnAS4cClhc OVPWaNQfXaELU2v1WisF/e0H0UD89BhpOKpvqtKqON1vZMwf/HhRwslWv9dG2B7lNF8J ZdKYOsdw8NunEUlYRIslG4wq99ps6bEU1PFjm9Wehyla/f4TY+wCWl7FN6XniszOuQmA GDXcPDN9tMwwLc+gFAciMd9sI5Glv937CQw7l0kAhTW0KGN8Cz+LdDlPO8WgEBW2ppPL EEhQ==; 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=1775111671; x=1775716471; 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=znZUH0RS002ExkldJKybpi0rQ0zl7NxavzUQAn1CUU8=; b=PAHSbVL7KI00gvCmHUHux0vXNi1uidUljQPD6ggMZRymyLxSbRqfanJruYWlOAn95J N3d7za5APvcWRq8DPmpua6nr2S33+CRIBX60eK4pM5me6O6QPxMvS2DTzu9yR++MyL6a as74CZpuyIq771dTsmamFJAfqTX92mxjPTW2hm0Bqw06THD6z/tQ0HAdtavDsl0ht24H ays7yKQDWehdwEkpV6bmOQEoFQYmjd4OMlq9TjiIcGKeyHQBSANrvHnavvddjky6TVVI R0ljT2Rnt8+AraqGhnH8OzSn1YT7MnAGo3ZtiSpgHgX+LhstkUu9CQ9VLsWFf7xlvRJt HVmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775111671; x=1775716471; 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=znZUH0RS002ExkldJKybpi0rQ0zl7NxavzUQAn1CUU8=; b=RSYR1zSZx6U+K7JMW9JUVr/+a6pg2BapRor/4BVK1kLHvLjtswgauOi0MpA6xRQyMl t4ZpfnQ/3vokHWgAHmpMtXcLUHO1xc+I5uBLBJA0Hsb8Z4AAKHTUUXjY3HMzcvPYOT+z OEEMSqZ4uoZrspEBBQ3/7lPp1E5mBNTiOzCg1ZVg9Jl4dWgN5JHN8wWDSrSFcHsVHM31 mceqeE7I5h4644W+HFiqqITpkIYZrO56xNdd0OcudsQ/wDzekqkcDB7MFa0dwU9+PW4+ IFg5z4xw8ljcdEwNLCaaQKTbV57Am0A5dRJ9DDDD1CwacLGCvkcTy9ECh+5L+pERLA/t ICyw== X-Forwarded-Encrypted: i=1; AJvYcCXwYbdHOEi7Ttpd7cxIbPRNJvRUyu/8TCbrG7+HyGmrK5yiBbFsUzKHLEAqb8Y3FqG8ydMKlM+d8EK8KFVJ@lists.postgresql.org X-Gm-Message-State: AOJu0Yy9CdhFshPFUokRMcqTJKXzQdDS+F5K408VDl1HbeAGETs1+Ckv nLwMBH7erWgDk/o+EXmhwRQbYwmCPgdqbQZ6L8h2XD/5yYca4thNkWIKgX8gGa+yhlAhbM90xuq Sb/o/Wn7/W0AzHvNnurf4FzUUobP7WOQ= X-Gm-Gg: ATEYQzy03aK7u1mVrxadQL8gdlqrCqQpJ2WKtExiiYMyLbMgLLxqGyy3CsrcBuiGqsg vbVDXnTkKgEc+u6ZDH0WId+EaEH5xduZjxTIz/1BpWP3WOeMezwlJJiNCv7LDvqGaSO8uZGF3Ha 9pfjb3gHdSuLpJ8XDk9+klGle94NdPbMzJrvUzoBLu7ZIRjCIJpTes/ElTLoKuD8qFRO9GG7p4V olb3WOl6mm9tGGFBf4h/+o0fHvsQb6U36ee06qiaf/samiqkPyOZkTFLQsh6qO/SvlbAzqCXJjo ckz062OaryRVXc6o5F/bhICP/JRXjUT4oL4KEoo2 X-Received: by 2002:a2e:bea4:0:b0:38b:d1d8:fc67 with SMTP id 38308e7fff4ca-38cc2beb5f5mr21822791fa.0.1775111670396; Wed, 01 Apr 2026 23:34:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Thu, 2 Apr 2026 12:04:18 +0530 X-Gm-Features: AQROBzAdQFY4xhIeIJIIZF2J4fdKD2ulFKvsSiSGhkxBaxL7sjsaRKz15NbL9SM Message-ID: Subject: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion? To: Fujii Masao Cc: Nisha Moond , "Zhijie Hou (Fujitsu)" , shveta malik , 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 Thu, Apr 2, 2026 at 10:31=E2=80=AFAM Fujii Masao = wrote: > > On Wed, Apr 1, 2026 at 8:11=E2=80=AFPM Nisha Moond wrote: > > > As for backpatching, this looks like it should go back to v17, where = slotsync > > > was introduced. Thought? > > > > Right, the issue exists in v17 as well. > > > > Attached the updated patch. > > Thanks for updating the patch! LGTM. > > I noticed that commit 1362bc33e02 updated the slotsync code so that a bac= kend > performing slot synchronization is signaled on promotion, but it was appl= ied > only to master. I=E2=80=99m not sure why it wasn=E2=80=99t backpatched to= v17 and v18, > It is because we added retry slot-sync logic for API in master in commit 0d2d4a0ec3eca64e7f5ce7f7630b56a561b2663c. So, there is no chance of API waiting except for the race condition being discussed here. > but it seems we need to backpatch it first before backpatching this patch= . > Thought? > I feel the use of API before this version was mainly for test-cases as it was not production ready. So, it is less helpful to backpatch 1362bc33e02, if we want, we can backpatch only the worker part of the fix. OTOH, as the issue is not frequent and we have some workaround (at least for more common platforms) as well, we can consider not backpatching it. --=20 With Regards, Amit Kapila.