Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQoOY-00012k-Pt for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Mar 2021 09:41:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lQoOX-00086W-KE for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Mar 2021 09:41:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQoOX-00086P-9w for pgsql-hackers@lists.postgresql.org; Mon, 29 Mar 2021 09:41:13 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lQoOU-0007ts-G1 for pgsql-hackers@postgresql.org; Mon, 29 Mar 2021 09:41:11 +0000 Received: by mail-wr1-x42e.google.com with SMTP id x13so12121888wrs.9 for ; Mon, 29 Mar 2021 02:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GEdN1Qfc/FrXkqwlkOG/6wtNKNteozKerikM6yZ5HpE=; b=tMt1Uz+mO+hd1TLjshyQAbjw6q5NE36yRpR5EVDJaDFdWqiB25jCAQilAdIfu1ZuNM c4noxQKHvPkU11lv/NN5VjezzvMCnLkUEXIS10aFIGS/DhD4agPK0eHImMT9HKzcRkqz KPedM46wQ6Hkte4kqljrLIOpfJ4u5f9nIlNxYsxdayxFLlwQ9ovkJl7ERvCEaXsZ5Cnz ZqD6QbZz9dIYx6EA0l2kLCmQI7S3eUN0UwIrMvMxaVeg34vEYIrK3vjkPP+trTEJ66/H yqcDzwhRqSTi45wHkhv5jNy3cfXmvB76VdmspXNPPlVQS89TZ+ndS9/kHPYxN0qPK9Cs Extg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GEdN1Qfc/FrXkqwlkOG/6wtNKNteozKerikM6yZ5HpE=; b=PYtAyoyTJd+CyqVgR6sxVsMl73MqlYOCJ47wx4ELdYC9FL2BLNNKnmksSewCD1F4G8 8adIGna1qzDuiJa21LVYxWDRvgSs2ieOBN4cjMf0Dyd7OEruo3wikx1IdINCrX10mD04 /rZifwUFzZO5U87Nyluu6Xa07Khkb+Qc47iHmRKIS6XM38CSrniEnkCSzuZ2hm/+Rz5L EjVW2DqwsZbyWtyY+deMWMjTksBJKijbjTXkvlJqB3HU5H9P+kqN2fTcTyJM51Li2G13 HCg9xptC3V4dzn6q/7l8AYbFWXDA3JIrKnMmJ+rD221xP3XmGt28IUzMcgNE5hEhNe2o XCWQ== X-Gm-Message-State: AOAM530UDGzm1tbadDIM4wSKZUnAOiCuCcTnf8eyEQZWWfCj1jFXefP3 1UfFnCpra1k3idO90amHN6SVEPGyyDpheOehrztQ9ypZoUelarES1muCDgT4O/mKqaxfolu6pqb fI7iNrphCPkH9A0U+6XjD6nSW+t0iy+1u3gB9Q4bkRu4Aa1jM+1IcA2BEVgpbEU7hCV9wr3Gzeg 5oUauFmH/EIszl6CBSBZ6LZDLmB2Xy3m8udc9n X-Google-Smtp-Source: ABdhPJycTrqj2y5u3uojrDqn/lpj3zEzQgtBxLdR2C3kdg7Xnvcz70PLE5X+xbjMvOZjTy0cOEpQhw== X-Received: by 2002:a5d:4e83:: with SMTP id e3mr27784573wru.82.1617010868105; Mon, 29 Mar 2021 02:41:08 -0700 (PDT) Received: from [10.80.18.124] (pool1-225.cgn.as8758.net. [212.25.6.225]) by smtp.gmail.com with ESMTPSA id u17sm22025723wmq.3.2021.03.29.02.41.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Mar 2021 02:41:07 -0700 (PDT) Subject: Re: [PATCH] Provide more information to filter_prepare To: Amit Kapila Cc: "pgsql-hackers@postgresql.org" , Ajin Cherian References: <6f322b21-cbb8-5f9a-b2aa-30323a6ab604@enterprisedb.com> <722e7841-f4fa-dddd-4466-990fcada5d78@enterprisedb.com> <590e0d87-8a7d-9310-ff6d-b484f15522d0@enterprisedb.com> From: Markus Wanner Message-ID: <86f51dc5-a667-c22d-4644-f5fa7ce97f98@enterprisedb.com> Date: Mon, 29 Mar 2021 11:41:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 29.03.21 11:13, Amit Kapila wrote: > This might or might not be valid for all logical replication solutions > but in the publisher-subscriber model, it would easily lead to > duplicate identifiers and block the replication. For example, when > there are multiple subscriptions (say - 2) for multiple publications > (again say-2), the two subscriptions are on Node-B and two > publications are on Node-A. Say both publications are for different > tables tab-1 and tab-2. Now, a prepared transaction involving > operation on both tables will generate the same GID. I think you are misunderstanding. This is about a globally unique identifier for a transaction, which has nothing to do with a GID used to prepare a transaction. This *needs* to be the same for what logical is the same transaction. What GID a downsteam subscriber uses when receiving messages from some non-Postgres-provided output plugin clearly is out of scope for this documentation. The point is to highlight how the xid can be useful for filter_prepare. And that serves transaction identification purposes. Regards Markus