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 1savdJ-00CG8p-IM for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2024 11:12:09 +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 1savdH-00CqKF-HE for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2024 11:12:07 +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.94.2) (envelope-from ) id 1savdH-00CqJw-6t for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2024 11:12:07 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1savdE-003Cgs-Db for pgsql-hackers@postgresql.org; Mon, 05 Aug 2024 11:12:05 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a7aabb71bb2so1280148066b.2 for ; Mon, 05 Aug 2024 04:12:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722856323; x=1723461123; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8zVffYaJDckpwYdBZJ62pAEhPyfVvBMuKgWmNSK1k+A=; b=EmbdiODlU0BfXwb8bCbKaOVbg3PJhzM8oJz1PDiU49YvpCrg66Ztwl2lNNg837NHl9 CmoXqKnGDNZzsTm0Ly82Rx9FqjtSVfNyKawW0ix5+FJhPRrzXmGbZaJfId3i86M7XoLq NTUEi/rxoumnLEPBkcTPHXXLwVTfk1xEQFnltjbIsRjn0bRjKdZAvLUg79+/lSCIVO9J Ad8IvDZ1JvZcgDCv1bo4Zkgeyj92UtqxerXr+PUZEvcV8yQ+QsQ7bEOu/Krr8z+UJSrx KEV2/wH2/32FdL/zPi5zNhAJBTny3IwsVsHBTqg16sX0i+kchMbxgXQ4yNPqdxALUgt4 tsLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722856323; x=1723461123; h=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=8zVffYaJDckpwYdBZJ62pAEhPyfVvBMuKgWmNSK1k+A=; b=nqIu7/u+ccUhvs838qQ2vextqXVZTFU86o9/VuFN1gBnRovikLzY9sOo65HKPXmQVk GufEiI8Pam0kBjAhBFdEaZ6zeEJ6N3dSPYMX0gFmMCRuGuXlDO7o4r0FB4K0vktownh7 khRFt2wG3Er78/VRYB/51Ai0d2p6t3AIuw/wo2zfsQoPTNmEVF0yeGLXc/4Hd+bFPWvo s2OgWUgFew6nbHovL2gtGTcXfg6HOTN9xIKmWlaXyVDovqWEbMESEsqkr4LlICJl1zQt SKT2D4Fej5RUEl1mW8TzjwDYPBZTsEVuxOcLaoQxWxndeNDdEC+bXBvPek7L8MWkKdBe n/8w== X-Forwarded-Encrypted: i=1; AJvYcCWPX/G7DocfetQlonyHn9NONaNpTm4Dfcb4mEgfgTNdJn7fzRJtGlTjNwCsdMK9uWjwl+pTQGgGsNAs6+QwQQGYke/sHHjkiwU7ACGL X-Gm-Message-State: AOJu0YxZ6GuUGU6Kjfnq9qxdQcrpfdDAECU/yCqHAXsW71qtIE4mqgpl sBtSH6/DTz2gqose8Tvqlq9YWSyWiI6Zgr0xdQSCQVyCCpoEzGxMGHemgMKbZRicG2cLB7yj8NI rwxqU7HDklReY/DloTjmpo3fF0B0= X-Google-Smtp-Source: AGHT+IF3pWon95xynUonfLI3sZEFeBOLzJ5zr9FKge6TF1yrmUBlaLf5ZeHI+DWh/ZHj2BA3wqB4c/rjiltLL79nEv8= X-Received: by 2002:a17:906:4fca:b0:a7a:aa35:409e with SMTP id a640c23a62f3a-a7dc4e2d4b4mr627173266b.25.1722856322337; Mon, 05 Aug 2024 04:12:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Michail Nikolaev Date: Mon, 5 Aug 2024 13:11:50 +0200 Message-ID: Subject: Re: [BUG?] check_exclusion_or_unique_constraint false negative To: Amit Kapila Cc: "Hayato Kuroda (Fujitsu)" , PostgreSQL Hackers , Andres Freund Content-Type: multipart/alternative; boundary="00000000000017980e061eedbf5d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000017980e061eedbf5d Content-Type: text/plain; charset="UTF-8" Hello! > 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. Yes, this is a nice feature. However, without the DirtySnapshot index scan fix, it will fail in numerous instances, especially in master-master replication. The update_missing feature is helpful in this case, but it is still not the correct event because a real tuple exists, and we should receive update_differ instead. As a result, some conflict resolution systems may malfunction. For example, if the resolution method is set to apply_or_skip, it will insert the new row, causing two rows to exist. This system is quite fragile, and I am sure there are many more complicated scenarios that could arise. Best regards, Mikhail. --00000000000017980e061eedbf5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

> Right, but we are extending= this functionality to detect and resolve
>=C2=A0such conflicts [1][2= ]. I am hoping after that such updates won't be
>=C2=A0missed.

Yes, this is a nice feature. However, without the DirtySnaps= hot index scan fix, it will fail in numerous instances, especially in maste= r-master replication.

The update_missing feature is helpful in this c= ase, but it is still not the correct event because a real tuple exists, and= we should receive update_differ instead. As a result, some conflict resolu= tion systems may malfunction. For example, if the resolution method is set = to apply_or_skip, it will insert the new row, causing two rows to exist. Th= is system is quite fragile, and I am sure there are many more complicated s= cenarios that could arise.

Best regards,
Mikhail.



=
--00000000000017980e061eedbf5d--