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 1saulh-00C6l3-Ag for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2024 10:16:45 +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 1sauld-00CboY-T3 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2024 10:16:41 +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.94.2) (envelope-from ) id 1sauld-00CboQ-Gv for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2024 10:16:41 +0000 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1saulW-003HRU-OT for pgsql-hackers@postgresql.org; Mon, 05 Aug 2024 10:16:40 +0000 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-264a12e05b9so6030080fac.1 for ; Mon, 05 Aug 2024 03:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722852992; x=1723457792; darn=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=uIy+U9gCz+doBYDkHHDs+9ln6Inb+7e+vicvWutOsrE=; b=aIe6SYL8cXTcgXDtF6VWrFM1iBO+yAGA2pq5CJmn6e9zWsjfhAUk5+dkiDScXAXBjB 9oKXN38nCvEbG9iFNaefYd/+QxqipYCElSf7hRCrjdg7qqtB/edsif9P85jBhSYVxRhv cIz6982lLto414CyUDghq2NyIcXNTLcF0+c9LxLkGIfDsAkv+iwmvwkCWthFeyPb/8yz 45WybGt/tLns53qxQfeynAMqTrxo0hFVjP1ivTiwFXrzPIjvwpeAseq/nIjmIf4dZ48d b2wlIO7MVrPmdqGmZVWgdkk6u5wAxyMtgTOzSvCM4wNmU4NIOZhAUnIXOBKCRykXUP02 JklA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722852992; x=1723457792; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uIy+U9gCz+doBYDkHHDs+9ln6Inb+7e+vicvWutOsrE=; b=dPqfZJiDLyOadIVyb34i4aRal9/Ish7L+mA/2G3pxV0m/JyDbSHV42FS0aavIKIT7P JdYp/IaLzd5FwQtfVZSz3Mu/brH/BXTbGbb2pUUg1tcHlkTS4no6d67/PlUFs4K8DiXs N0qXJuE2wL0ZvO2Lc0ujv5wtj7QuFwHiqsbHucYgr20+IefaaoRsmQ+S+aYMCe9VK40o ljJnN7GI9mjGQKPU1oaVVUzImao7UGppvPJmkdgfI39PocVZOh0xx5TGd+5rwIHFGkGk kr03HlMCUsIqGNkmXPsEaeFBC8rBBbCa9UoU1tfpM1x3w2zNcaCMEgJ94GwkLz6nEPoE QXPQ== X-Forwarded-Encrypted: i=1; AJvYcCVlaV5b6PnTzxqujSZQgd9XZYv9QAeEBscJCKAkX3pVabhAbKN3j+QCEBLiS8wE4LzdhakkcBCIbTfwFwsMIFiuYwHpTiukn0QPduGG X-Gm-Message-State: AOJu0Yy8XtaY7Izzr+0RqB7wKlabkQlAE+/cwLn6rZDJ3LbWx8KeT+HS KDBwOgsX1YdcpGKaLpJyDxXWNh3eGePa1tbdTnO7VQNF9LuwLEgmmOKtJBUVi3cCGJC3Cfjdeim JVPpstS/T/8d47Dsuma6ynoNpFf0= X-Google-Smtp-Source: AGHT+IHtqknmzZAIOl0t4up+h1D2sMEM5MGqFa7J0I1JxNKdRrY2mNW1s7IKe35tud927RJ8T0P4ttGsqJWv9UiQTeE= X-Received: by 2002:a05:6870:164f:b0:260:ee93:f388 with SMTP id 586e51a60fabf-26891ea94fdmr14682156fac.32.1722852992120; Mon, 05 Aug 2024 03:16:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Mon, 5 Aug 2024 15:46:20 +0530 Message-ID: Subject: Re: [BUG?] check_exclusion_or_unique_constraint false negative To: Michail Nikolaev Cc: "Hayato Kuroda (Fujitsu)" , PostgreSQL Hackers , Andres Freund 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 Fri, Aug 2, 2024 at 10:38=E2=80=AFPM Michail Nikolaev wrote: > > > I think it is rather less likely or not possible in a parallel apply > > case because such conflicting updates (updates on the same tuple) > > should be serialized at the publisher itself. So one of the updates > > will be after the commit that has the second update. > > Glad to hear! But anyway, such logic looks very fragile to me. > > > I haven't tried the test based on your description of the general > > problem with DirtySnapshot scan. In case of logical replication, we > > will LOG update_missing type of conflict and the user may need to take > > some manual action based on that. > > Current it is just DEBUG1, so it will be probably missed by the user. > > > * XXX should this be promoted to ereport(LOG) perhaps? > > */ > > elog(DEBUG1, > > "logical replication did not find row to be updated " > > "in replication target relation \"%s\"", > > RelationGetRelationName(localrel)); > > } > Right, but we are extending this functionality to detect and resolve such conflicts [1][2]. I am hoping after that such updates won't be missed. [1] - https://commitfest.postgresql.org/49/5064/ [2] - https://commitfest.postgresql.org/49/5021/ --=20 With Regards, Amit Kapila.