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 1wj7SK-000ZnM-1P for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2026 03:35:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wj7SI-008QZm-2o for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2026 03:35:43 +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 1wj7SI-008QZZ-1v for pgsql-hackers@lists.postgresql.org; Mon, 13 Jul 2026 03:35:43 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wj7SG-000000013qK-31cM for pgsql-hackers@postgresql.org; Mon, 13 Jul 2026 03:35:43 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2cacb8416a1so23108785ad.1 for ; Sun, 12 Jul 2026 20:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1783913739; x=1784518539; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=h8hLS8j0Okegey9ab1aTCwHh99rWVDBblrKvDQQYH3Y=; b=Ar/PPMP46wh9wgbYbtOe1pPRdq6iiCpync8cIwwlQBu4mqPbVB6aVu15nC8A2WLQml 1putUXJ5FALMHXKB88UGLVMNfC5hS66vkn6jMOLHlE13CKh1J5rprC+PxFNl2X8AXdPp P/WWEEV1WC24FCd7tARuHxzOfnXkNrl1Wc8u4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783913739; x=1784518539; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=h8hLS8j0Okegey9ab1aTCwHh99rWVDBblrKvDQQYH3Y=; b=LlGdoT46XeBsRcCIQXgiZbfRgP2s1BRu8Y1OJ8+ZsmIqOy/0tyb2kz9fi57LG0Goaa VzkArNjahyjb46mIwPR8VGPluAuydKAqJgVqq6bF5pRDhyPfQ6SK1/KSmvV7orMX7sGn jyMptwmngfgdKx1u9S3CS+lguy7wxRApVnY/T65GCoSf0ZdXoD6Vonpgbb3Y/25Bws56 9R4G3yK2LpDdr3fCvdi2/JsuOlX+BQf17K+LWZI9yHWUcjneVHjKD9aeJiST2OHec6XI zNQG9hmuW1DUZhVuq3aqr0425/RkYv4bO91L6ql4pFV7zO71/QUjQERXy8dYSlyBVlFt KBUg== X-Forwarded-Encrypted: i=1; AHgh+Rra2OMvrHkqSVH8jtU6+uoMbP1IKZNRBj5C79ovo27LONcHZuH7Hr52QLqjhOn1bzPiWVp9lXmzl//cWc0V@postgresql.org X-Gm-Message-State: AOJu0YwrBzLf4vsckzfEP93BCJRYVKw4O65R3Mn/kkiqj8MviKIGKRmT E9zw1ZdrgvE24jTWU4by45jzkO0kanm97nHXiyjjswjPTjYxrUlRr4sCYME72wwvzg== X-Gm-Gg: AfdE7cnQeHxjAqVNDSZX8YDLVcnVB1c+Q32W0FAEZsw/jCuGcdGzH5RxkxyJFrYnMWs Axv0/KJNeZ4mgNgtPeLY0bUuttjWBEWs36Y0TG9+PXGo1AKfUs6NmYko+i+w2VxmPPJr2MpKVE7 1MKOZb2I0pBtApnQewMhUozuHi+dpFNQbWR3iORtBH/kv1UfWEY1gNQl+eH77YhFpuPFs3me8Y2 1gO/yC8F2kL7cOZ1Cdk1dSpO7fm2dd7RIxoGQ+2HDfZnMrZ2YLQwBDNgtULhdIJjaqKy+vjsZXN Q7hIovDburmW4HiJN01xpcWx6sp5dIoFOwAvsG3+9hJB4ZcldILp0zOH3ASUf14jdzlDlxbc7C+ tfW7lxL68zHa9Hdct5GfuwSbCWjPLv3mW9BWSKhUcxMWWrZV/16658xRGScL4AFNynZy+miCz6v r8tc1CvDh7iwCzmnp0n7t8DrEwQZ1TGVl/zewDqs7TG9n+ X-Received: by 2002:a05:6a21:6b18:b0:3b2:a8cd:ef4a with SMTP id adf61e73a8af0-3c110768b5dmr7340771637.30.1783913739038; Sun, 12 Jul 2026 20:35:39 -0700 (PDT) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-311935fd091sm44396018eec.24.2026.07.12.20.35.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2026 20:35:38 -0700 (PDT) Date: Sun, 12 Jul 2026 20:35:36 -0700 From: Noah Misch To: Amit Kapila Cc: vignesh21@gmail.com, pgsql-hackers@postgresql.org Subject: Re: sequencesync worker race with REFRESH SEQUENCES Message-ID: <20260713033536.d5.noahmisch@microsoft.com> References: <20260710045217.f0.noahmisch@microsoft.com> <20260711201410.4a.noahmisch@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 13, 2026 at 08:53:42AM +0530, Amit Kapila wrote: > On Sun, Jul 12, 2026 at 1:44 AM Noah Misch wrote: > Sounds reasonable. Considering both your points, I am leaning towards > option (a) (during REFRESH SEQUENCES command, if we detect that the > sequencesync worker is in progress, we make the command return ERROR > suggesting sequence sync is already in-progress). If in future auto > sequence sync functionality is implemented, such an ERROR could still > be appropriate because the auto sync should automatically take care of > syncing. Or, we can even go in the direction that we can use this > command to somehow immediately perform an auto sequence sync cycle > instead of time-based re-sync. Sounds good. > > Does that help? > > Yes, thanks. But share your suggestion if you disagree with the above > or any other fix for the problem(s) reported by you.